/**
 * Application Styles
 */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: #f2f2f7;
  padding: 20px;
}

.container {
  max-width: 800px;
  margin: 0 auto;
}

.nav-header {
  background: white;
  padding: 16px 20px;
  border-radius: 10px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.nav-title {
  font-size: 22px;
  font-weight: 600;
  color: #000;
}

.success-view {
  background: white;
  border-radius: 10px;
  padding: 60px 40px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.success-icon {
  font-size: 80px;
  margin-bottom: 20px;
}

.success-title {
  font-size: 34px;
  font-weight: 700;
  margin-bottom: 20px;
  color: #000;
}

.success-message {
  font-size: 16px;
  color: #666;
  line-height: 1.5;
  margin-bottom: 40px;
}

.success-hint {
  font-size: 13px;
  color: #999;
}

.loading-view {
  background: white;
  border-radius: 10px;
  padding: 60px 40px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  margin-top: 20px;
}

.loading-spinner-large {
  width: 60px;
  height: 60px;
  border: 4px solid #e0e0e0;
  border-top-color: #007AFF;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 20px;
}

.loading-title {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 10px;
  color: #000;
}

.loading-hint {
  font-size: 13px;
  color: #999;
}

.error-view {
  background: white;
  border-radius: 10px;
  padding: 60px 40px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  margin-top: 20px;
}

.error-icon {
  font-size: 80px;
  margin-bottom: 20px;
}

.error-view-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 15px;
  color: #FF3B30;
}

.error-view-message {
  font-size: 16px;
  color: #666;
  line-height: 1.5;
  margin-bottom: 30px;
}

.error-view-hint {
  font-size: 13px;
  color: #999;
}

.form-section {
  background: white;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.section-header {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  color: #666;
  margin-bottom: 15px;
  letter-spacing: 0.5px;
}

.field-group {
  margin-bottom: 20px;
  position: relative;
}

.field-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background: #f9f9f9;
}

.field-icon {
  font-size: 20px;
  width: 25px;
  text-align: center;
  flex-shrink: 0;
  color: #666;
}

.field-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 16px;
  outline: none;
  padding: 4px 0;
}

.checkmark {
  color: #34C759;
  font-size: 20px;
}

.error-text {
  font-size: 12px;
  color: #FF3B30;
  margin-top: 4px;
  margin-left: 35px;
}

.phone-row {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

.country-selector {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  user-select: none;
}

.country-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  margin-top: 5px;
  z-index: 1000;
  display: none;
  min-width: 200px;
}

.country-dropdown.show {
  display: block;
}

.country-option {
  padding: 12px 16px;
  cursor: pointer;
  font-size: 15px;
}

.country-option:hover {
  background-color: #f5f5f5;
}

.divider {
  width: 0.5px;
  height: 20px;
  background-color: #999;
}

.loading-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  color: #666;
  font-size: 13px;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid #e0e0e0;
  border-top-color: #007AFF;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.error-box {
  padding: 16px;
  background: #FFF3CD;
  border: 1px solid #FFE69C;
  border-radius: 8px;
  margin-bottom: 15px;
}

.error-title {
  font-size: 16px;
  font-weight: 600;
  color: #FF8C00;
  margin-bottom: 8px;
}

.error-message {
  font-size: 13px;
  color: #666;
  margin-bottom: 12px;
}

.retry-button {
  background: none;
  border: none;
  color: #007AFF;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.zone-error-box {
  padding: 16px;
  background: #FFE5E5;
  border: 1px solid #FFCCCC;
  border-radius: 8px;
  margin-top: 15px;
}

.zone-error-title {
  font-size: 16px;
  font-weight: 600;
  color: #FF3B30;
  margin-bottom: 8px;
}

.suggestion-item {
  padding: 12px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
}

.suggestion-item:hover {
  background-color: #f5f5f5;
}

.suggestion-title {
  font-size: 15px;
  margin-bottom: 4px;
}

.suggestion-subtitle {
  font-size: 13px;
  color: #666;
}

.address-type-picker {
  display: flex;
  gap: 8px;
  margin-top: 15px;
}

.picker-option {
  flex: 1;
  padding: 10px;
  text-align: center;
  border: 1px solid #007AFF;
  border-radius: 8px;
  cursor: pointer;
  font-size: 15px;
  background: white;
  color: #007AFF;
}

.picker-option.selected {
  background: #007AFF;
  color: white;
}

.address-details {
  margin-top: 20px;
}

.split-fields {
  display: flex;
  gap: 15px;
}

.split-fields .field-group {
  flex: 1;
}

.submit-container {
  background: white;
  padding: 20px;
  border-radius: 10px;
  margin-top: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.submit-error {
  text-align: center;
  color: #FF3B30;
  font-size: 13px;
  margin-bottom: 10px;
}

.submit-info {
  text-align: center;
  color: #007AFF;
  font-size: 13px;
  margin-bottom: 10px;
  font-weight: 500;
}

.submit-button {
  width: 100%;
  height: 56px;
  border: none;
  border-radius: 16px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: white;
  transition: opacity 0.2s;
}

.submit-button.enabled {
  background-color: #007AFF;
}

.submit-button.disabled {
  background-color: rgba(128, 128, 128, 0.3);
  cursor: not-allowed;
}

.submit-button:hover.enabled {
  opacity: 0.9;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-10px); }
  75% { transform: translateX(10px); }
}

.shake {
  animation: shake 0.3s ease-in-out;
}

.autocomplete-container {
  position: relative;
}

.pac-container {
  z-index: 1050;
}

@media (max-width: 600px) {
  body {
    padding: 10px;
  }

  .split-fields {
    flex-direction: column;
    gap: 0;
  }
}