/* ZIP Search Widget Styles */

.zip-search-form {
    width: 100%;
}

.search-input-container {
    display: flex;
    width: 100%;
    position: relative;
    gap: 20px;
}

.zip-search-form .zip-input {
    flex: 1;
    padding: 10px 20px !important;
    border: none;
    outline: none;
    font-size: 16px;
    font-weight: 400;
    background: #fff !important;
    border-radius: 30px !important;
    border: 1px solid #002F5F !important;
    height: 48px !important;
}

.zip-search-widget .loading-message, .zip-search-widget .error-message, .zip-search-widget .no-results {
  padding: 0 !important;
  background: transparent !important;
  margin: 20px 0 !important;
  border: none;
  text-align: left !important;
}

.zip-input::placeholder {
    color: #666;
    font-weight: 400;
}

.zip-input:focus {
    background: transparent;
    outline: none !important;
    box-shadow: none !important;
    border: 1px solid #002F5F !important;
}

.zip-input:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}

.zip-input:-webkit-autofill,
.zip-input:-webkit-autofill:hover,
.zip-input:-webkit-autofill:focus {
    outline: none !important;
    box-shadow: none !important;
    border: 1px solid #002F5F !important;
}

.zip-search-widget .search-btn {
  background: #002F5F !important;
  color: white !important;
  border: none;
  font-size: 18px !important;
  font-weight: 600;
  cursor: pointer;
  border-radius: 30px !important;
  transition: all 0.3s ease;
  min-width: 120px;
  text-transform: capitalize;
  height: 48px;
}

.zip-search-widget .search-btn:hover {
    background: #fff !important;
    color: #002F5F !important;
    border: 1px solid #002F5F !important;
}

.zip-search-widget .search-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.zip-search-widget .search-btn:disabled {
    background: #90a4ae;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Error states */
.zip-input.error {
    border-color: #f44336;
    background-color: #ffebee;
}

.error-message {
    color: #f44336;
    font-size: 14px;
    margin-top: 8px;
    text-align: center;
    font-weight: 500;
}

/* Loading state */
.zip-search-widget .search-btn.loading {
    position: relative;
    color: transparent;
}

.zip-search-widget .search-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
  .search-input-container{
    gap: 7px !important
  }

    .zip-search-widget {
        padding: 15px;
        max-width: 100%;
    }
    
    .search-input-container {
        border-radius: 20px;
    }
    
    .zip-input {
        padding: 14px 16px;
        font-size: 15px;
        border-radius: 20px 0 0 20px;
    }
    
    .zip-search-widget .search-btn {
        padding: 14px 20px;
        font-size: 15px;
        border-radius: 0 20px 20px 0;
        min-width: 80px;
        margin-top: 0 !important;
        height: 48px !important;
        width: 120px !important;
    }
}

@media (max-width: 480px) {
    .zip-search-widget {
        padding: 15px 0;
    }
    
    .search-input-container {
        flex-direction: row;
        border-radius: 15px;
    }
    
    .zip-input {
        padding: 12px 16px;
        border-radius: 15px 15px 0 0;
        border-bottom: 1px solid #e0e0e0;
    }
    
    .zip-search-widget .search-btn {
        padding: 12px 16px;
        border-radius: 0 0 15px 15px;
        min-width: auto;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .zip-search-widget {
        background: white;
        border: 2px solid #000;
    }
    
    .search-input-container {
        border: 3px solid #000;
    }
    
    .zip-search-widget .search-btn {
        background: #000;
        color: white;
    }
}
