/**
 * Quote Form Styles
 * 
 * Professional styling for the simple quote form
 */

/* Quote Form Container */
.packlink-quote-form-container {
  max-width: 100%;
  margin: 0 auto;
  padding: 0;
  position: relative;
}

/* Quote Form */
.packlink-quote-form {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(249, 250, 251, 0.95) 100%);
  border-radius: 20px;
  padding: 32px 40px;
  box-shadow: 
    0 0 0 1px rgba(2, 115, 97, 0.1),
    0 8px 32px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: visible;
}

.packlink-quote-form::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 30% 20%, rgba(2, 115, 97, 0.02) 0%, transparent 50%),
              radial-gradient(circle at 70% 80%, rgba(32, 178, 170, 0.02) 0%, transparent 50%);
  border-radius: inherit;
  pointer-events: none;
}

.packlink-quote-form > * {
  position: relative;
  z-index: 1;
}

/* Quote Form Header */
.quote-form-header {
  margin-bottom: 32px;
  text-align: center;
}

.quote-form-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 24px 0;
  letter-spacing: -0.025em;
  line-height: 1.3;
  text-align: center;
}

/* Country Inputs Container */
.country-inputs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  max-width: 800px;
  margin: 0 auto;
}

.to-text {
  font-size: 1.125rem;
  font-weight: 600;
  color: #6b7280;
  margin: 0;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Country Input Wrapper */
.country-input-wrapper {
  position: relative;
  min-width: 220px;
  flex: 1;
  max-width: 300px;
}

.country-search-wrapper {
  position: relative;
  width: 100%;
}

/* Country Input Styling */
.country-search {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 500;
  color: #374151;
  background: rgba(255, 255, 255, 0.9);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
  text-align: center;
}

.country-search:focus {
  border-color: #027361;
  box-shadow: 
    0 0 0 3px rgba(2, 115, 97, 0.1),
    0 4px 12px rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 1);
  text-align: left;
}

.country-search:hover:not(:focus) {
  border-color: #d1d5db;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.06);
}

.country-search::placeholder {
  color: #9ca3af;
  font-weight: 400;
  text-align: center;
}

/* Country Options (Suggestions) - Matching main form exactly */
.country-options {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 200px;
    overflow-y: auto;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    margin-top: 2px;
}

.country-options.active {
    display: block;
}

.country-option {
    padding: 8px 12px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 14px;
    border-bottom: 1px solid #f5f5f5;
}

.country-option:last-child {
    border-bottom: none;
}

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

.country-option.selected {
    background-color: #e3f2fd;
}

.country-option.no-results {
    color: #666;
    font-style: italic;
    cursor: default;
}

.country-option.no-results:hover {
    background-color: transparent;
}

/* Form Actions */
.quote-form-actions {
  display: flex;
  justify-content: center;
  margin-top: 32px;
  padding-top: 8px;
}

/* Get Quote Button */
.get-quote-btn {
  background: linear-gradient(135deg, #027361 0%, #20b2aa 100%);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 16px 32px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 
    0 0 0 1px rgba(2, 115, 97, 0.1),
    0 4px 12px rgba(2, 115, 97, 0.25);
  position: relative;
  overflow: hidden;
  min-width: 180px;
}

.get-quote-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  transition: left 0.6s ease;
}

.get-quote-btn:hover::before {
  left: 100%;
}

.get-quote-btn:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 0 0 1px rgba(2, 115, 97, 0.15),
    0 8px 24px rgba(2, 115, 97, 0.35);
}

.get-quote-btn:active {
  transform: translateY(0);
  transition-duration: 0.1s;
}

.get-quote-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Loading State */
.packlink-quote-form.loading .get-quote-btn {
  opacity: 0.7;
  cursor: not-allowed;
}

.packlink-quote-form.loading .get-quote-btn::after {
  content: '';
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-left: 8px;
}

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

/* Error States */
.country-search.error {
  border-color: #ef4444;
  box-shadow: 
    0 0 0 3px rgba(239, 68, 68, 0.1),
    0 2px 4px rgba(0, 0, 0, 0.04);
}

.error-message {
  color: #ef4444;
  font-size: 0.875rem;
  margin-top: 8px;
  font-weight: 500;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  z-index: 999;
}

/* Success States */
.country-search.valid {
  border-color: #10b981;
  box-shadow: 
    0 0 0 3px rgba(16, 185, 129, 0.1),
    0 2px 4px rgba(0, 0, 0, 0.04);
}

/* Responsive Design */
@media (max-width: 768px) {
  .packlink-quote-form-container {
    margin: 0 16px;
  }
  
  .packlink-quote-form {
    padding: 20px 24px;
    border-radius: 16px;
  }
  
  .quote-form-title {
    font-size: 1.25rem;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }
  
  .country-inputs {
    width: 100%;
    margin-top: 16px;
    flex-direction: column;
    gap: 12px;
  }
  
  .to-text {
    font-size: 1.125rem;
    align-self: center;
    margin: 0;
  }
  
  .country-input-wrapper {
    min-width: unset;
  }
  
  .country-search {
    font-size: 1rem;
    padding: 12px 14px;
  }
  
  .get-quote-btn {
    padding: 12px 24px;
    font-size: 0.9rem;
  }

  .quote-form-actions {
    margin-top: 20px;
  }
}

@media (max-width: 480px) {
  .packlink-quote-form {
    padding: 16px 20px;
  }
  
  .quote-form-title {
    font-size: 1.125rem;
  }
  
  .country-search {
    padding: 10px 12px;
  }
  
  .get-quote-btn {
    padding: 10px 20px;
    font-size: 0.85rem;
  }
}

.packlink-quote-form {
  animation: slideInUp 0.6s ease-out;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.country-search:focus-visible,
.get-quote-btn:focus-visible {
  outline: 2px solid #027361;
  outline-offset: 2px;
} 