/**
 * GLRelief Location Selector Styles
 * Styling for dynamic location dropdowns
 */

/* Loading state for select elements */
select.is-loading,
input.is-loading {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 50 50'%3E%3Cpath fill='%23667eea' d='M25,5A20.14,20.14,0,0,1,45,22.88a2.51,2.51,0,0,0,2.49,2.26h0A2.52,2.52,0,0,0,50,22.33a25.14,25.14,0,0,0-50,0,2.52,2.52,0,0,0,2.5,2.81h0A2.51,2.51,0,0,0,5,22.88,20.14,20.14,0,0,1,25,5Z'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 25 25' to='360 25 25' dur='0.6s' repeatCount='indefinite'/%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 20px 20px;
    padding-right: 40px !important;
}

/* Enhanced select styling */
.location-select {
    position: relative;
}

.location-select select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23667eea' d='M10.293,3.293,6,7.586,1.707,3.293A1,1,0,0,0,.293,4.707l5,5a1,1,0,0,0,1.414,0l5-5a1,1,0,1,0-1.414-1.414Z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 12px 12px;
    padding-right: 35px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.location-select select:hover:not(:disabled) {
    border-color: #667eea;
}

.location-select select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    outline: none;
}

.location-select select:disabled {
    background-color: #f8f9fa;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Location icon styling */
.location-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #667eea;
    pointer-events: none;
}

.location-select select.with-icon {
    padding-left: 35px;
}

/* Zipcode input styling */
.zipcode-input-group {
    position: relative;
}

.zipcode-input-group input {
    padding-right: 100px;
}

.zipcode-lookup-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 5px 15px;
    border-radius: 5px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.zipcode-lookup-btn:hover {
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.zipcode-lookup-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Valid/Invalid state styling */
.form-control.is-valid {
    border-color: #28a745;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.form-control.is-invalid {
    border-color: #dc3545;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23dc3545' viewBox='0 0 12 12'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

/* Feedback messages */
.valid-feedback,
.invalid-feedback {
    display: none;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875em;
}

.valid-feedback.d-block {
    display: block;
    color: #28a745;
}

.invalid-feedback.d-block {
    display: block;
    color: #dc3545;
}

/* Location card */
.location-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
    border-left: 5px solid #667eea;
}

.location-card h5 {
    color: #667eea;
    margin-bottom: 20px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .location-select select {
        font-size: 14px;
    }

    .zipcode-input-group input {
        padding-right: 90px;
    }

    .zipcode-lookup-btn {
        padding: 4px 10px;
        font-size: 0.75rem;
    }
}

/* Animation for feedback */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.valid-feedback.d-block,
.invalid-feedback.d-block {
    animation: fadeIn 0.3s ease;
}

/* Country flag emoji spacing */
select option[data-flag]::before {
    content: attr(data-flag) " ";
}

/* Loading overlay for select */
.location-select.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.7);
    pointer-events: none;
}

/* Tooltip for disabled selects */
.location-select select:disabled {
    cursor: not-allowed;
}

.location-select:has(select:disabled) {
    position: relative;
}

.location-select select:disabled:hover::after {
    content: 'Please select ' attr(data-depends) ' first';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    white-space: nowrap;
    margin-bottom: 5px;
}

/* Auto-complete styling */
.location-autocomplete {
    position: relative;
}

.location-autocomplete-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 5px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.location-autocomplete-item {
    padding: 10px 15px;
    cursor: pointer;
    transition: background 0.2s;
}

.location-autocomplete-item:hover {
    background: #f8f9fa;
}

.location-autocomplete-item.active {
    background: #667eea;
    color: white;
}

/* Help & Support - Modern Unified Design */
.help-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #0c4a6e 100%);
    color: #fff;
    padding: 3rem 0;
    text-align: center;
}
.help-hero h1 { font-size: 2.25rem; font-weight: 700; margin-bottom: 0.75rem; letter-spacing: -0.02em; }
.help-hero .lead { font-size: 1.1rem; opacity: 0.9; max-width: 560px; margin: 0 auto; }

.help-topic-card {
    background: #fff;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    color: inherit;
    display: block;
    border: 1px solid rgba(0,0,0,0.04);
}
.help-topic-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
}
.help-topic-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.25rem; margin-bottom: 0.75rem; }
.help-topic-card h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 0.25rem; }

.help-contact-card {
    background: #fff;
    border-radius: 16px;
    padding: 1.75rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.04);
}
.help-contact-card:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(0,0,0,0.1); }
.help-contact-icon { width: 56px; height: 56px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 1.35rem; color: #fff; margin-bottom: 1rem; }
.help-contact-card h4 { font-size: 1rem; font-weight: 600; margin-bottom: 0.5rem; }
.help-contact-card a { color: #0284c7; text-decoration: none; }
.help-contact-card a:hover { text-decoration: underline; }

.faq-accordion .accordion-item { border: none; margin-bottom: 0.5rem; border-radius: 12px !important; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,0.04); }
.faq-accordion .accordion-button { background: #fff; border: none; font-weight: 600; padding: 1rem 1.25rem; }
.faq-accordion .accordion-button:not(.collapsed) { background: #f8fafc; color: #0c4a6e; }
.faq-accordion .accordion-button::after { margin-left: auto; }
.faq-accordion .accordion-body { padding: 1rem 1.25rem; color: #475569; }

.help-form-card { background: #fff; border-radius: 16px; padding: 2rem; box-shadow: 0 4px 20px rgba(0,0,0,0.06); border: 1px solid rgba(0,0,0,0.04); }
.help-form-card .form-control, .help-form-card .form-select { border-radius: 10px; }
.help-form-card .form-control:focus { border-color: #0284c7; box-shadow: 0 0 0 3px rgba(2,132,199,0.15); }
.btn-help-submit { background: linear-gradient(135deg, #0284c7 0%, #0c4a6e 100%); border: none; padding: 0.75rem 1.5rem; font-weight: 600; border-radius: 10px; }

.help-map { border-radius: 16px; overflow: hidden; box-shadow: 0 4px 20px rgba(0,0,0,0.08); }

.help-office-card { background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%); border-radius: 14px; padding: 1.5rem; border-left: 4px solid #0284c7; transition: transform 0.2s; }
.help-office-card:hover { transform: translateX(4px); }

.help-social a {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border-radius: 12px;
    background: linear-gradient(135deg, #0284c7 0%, #0c4a6e 100%);
    color: #fff; margin: 0 4px; transition: all 0.3s ease;
}
.help-social a:hover { transform: translateY(-3px); opacity: 0.9; }

.help-emergency { background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%); border-radius: 16px; padding: 1.5rem; text-align: center; border: 1px solid #fcd34d; }
.help-emergency h4 { color: #92400e; font-weight: 700; }
.help-emergency a { color: #0c4a6e; font-weight: 600; }

.content-area .container { max-width: 1140px; margin: 0 auto; padding: 0 1rem; }

