/* Stili per il componente Location Search con Google Places Autocomplete */

/* Force light mode - override browser dark mode */
.checkbox-custom {
    background-color: #ffffff !important;
    border-color: #d1d5db !important;
}

.checkbox-text {
    color: #1f2937 !important;
}

.location-search-container {
    margin-bottom: 1rem;
}

.location-search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.location-search-input {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 2.5rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    background-color: #ffffff;
    transition: all 0.2s ease-in-out;
    box-sizing: border-box;
}

.location-search-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background-color: #ffffff;
}

.location-search-input:hover {
    border-color: #d1d5db;
}

.location-search-input::placeholder {
    color: #9ca3af;
    font-style: italic;
}

.form-input
{
    padding-left: 1.35rem !important;
}

.location-search-icon {
    position: absolute;
    left: 0.3rem;
    color: #6b7280;
    font-size: 1rem;
    pointer-events: none;
    z-index: 1;
}

.clear-location-btn {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #9ca3af;
    cursor: pointer;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease-in-out;
    z-index: 2;
}

.clear-location-btn:hover {
    background-color: #f3f4f6;
    color: #374151;
}

.clear-location-btn:active {
    background-color: #e5e7eb;
}

.location-search-loading {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    color: #6b7280;
    text-align: center;
}

/* Stili per il dropdown di Google Places Autocomplete */
.pac-container {
    border-radius: 0.5rem !important;
    border: 1px solid #e5e7eb !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif !important;
    margin-top: 2px !important;
}

.pac-container:after {
    display: none !important;
}

.pac-item {
    padding: 0.75rem !important;
    border-bottom: 1px solid #f3f4f6 !important;
    cursor: pointer !important;
    font-size: 0.875rem !important;
    line-height: 1.25rem !important;
}

.pac-item:last-child {
    border-bottom: none !important;
}

.pac-item:hover {
    background-color: #f9fafb !important;
}

.pac-item-selected {
    background-color: #eff6ff !important;
}

.pac-matched {
    font-weight: 600 !important;
    color: #1f2937 !important;
}

.pac-item-query {
    color: #374151 !important;
    font-size: 0.875rem !important;
}

.pac-secondary-text {
    color: #6b7280 !important;
    font-size: 0.8125rem !important;
    margin-top: 0.125rem !important;
}

.pac-icon {
    margin-right: 0.75rem !important;
    margin-top: 0.125rem !important;
}

/* Responsive design */
@media (max-width: 768px) {
    .location-search-input {
        padding: 0.6rem 2.25rem 0.6rem 2.25rem;
        font-size: 0.8125rem;
    }

    .location-search-icon {
        left: 0.3rem;
        font-size: 0.875rem;
    }

    .clear-location-btn {
        right: 0.4rem;
        font-size: 1.25rem;
        width: 1.75rem;
        height: 1.75rem;
    }
}

/* Stato di errore */
.location-search-input.error {
    border-color: #ef4444;
    background-color: #fef2f2;
}

.location-search-input.error:focus {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Stato di successo */
.location-search-input.success {
    border-color: #10b981;
    background-color: #f0fdf4;
}

.location-search-input.success:focus {
    border-color: #059669;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* Animazioni */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-0.5rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.location-search-loading {
    animation: fadeIn 0.2s ease-out;
}

/* Stili per il filtro favoriti */
.checkbox-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.favorite-checkbox {
    display: none; /* Nasconde il checkbox nativo */
}

.purchased-checkbox {
    display: none; /* Nasconde il checkbox nativo */
}


.checkbox-custom {
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid #d1d5db;
    border-radius: 0.25rem;
    background-color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    position: relative;
}

.favorite-checkbox:checked + .checkbox-custom {
    background-color: #f59e0b;
    border-color: #f59e0b;
}

.favorite-checkbox:checked + .checkbox-custom::after {
    content: '✓';
    color: white;
    font-size: 0.875rem;
    font-weight: bold;
}

.purchased-checkbox:checked + .checkbox-custom {
    background-color: #f59e0b;
    border-color: #f59e0b;
}

.purchased-checkbox:checked + .checkbox-custom::after {
    content: '✓';
    color: white;
    font-size: 0.875rem;
    font-weight: bold;
}

.checkbox-custom:hover {
    border-color: #f59e0b;
    background-color: #fef3c7;
}

.checkbox-text {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
}

.favorite-icon {
    font-size: 1rem;
    animation: none;
}

.favorite-checkbox:checked ~ .checkbox-text .favorite-icon {
    animation: starPulse 0.3s ease-in-out;
}

@keyframes starPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.help-text {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
    margin-left: 1.75rem;
    font-style: italic;
}

/* Force light mode - disable dark mode completely */
@media (prefers-color-scheme: dark) {
    .location-search-input {
        background-color: #ffffff !important;
        border-color: #e5e7eb !important;
        color: #1f2937 !important;
    }

    .location-search-input:focus {
        border-color: #3b82f6 !important;
        background-color: #ffffff !important;
    }

    .location-search-input::placeholder {
        color: #9ca3af !important;
    }

    .location-search-icon {
        color: #6b7280 !important;
    }

    .clear-location-btn {
        color: #9ca3af !important;
    }

    .clear-location-btn:hover {
        background-color: #f3f4f6 !important;
        color: #374151 !important;
    }

    .location-search-loading {
        background-color: #f9fafb !important;
        border-color: #e5e7eb !important;
        color: #6b7280 !important;
    }

    .checkbox-custom {
        background-color: #ffffff !important;
        border-color: #d1d5db !important;
    }

    .checkbox-text {
        color: #1f2937 !important;
    }

    .help-text {
        color: #6b7280 !important;
    }
}