div.field_with_errors {
    display: inline;
}

div.field_with_errors input[type="checkbox"] {
    border-color: rgba(252, 165, 165, 1);
}

/* Search Dropdown Styles */
.search-dropdown {
    animation: fadeIn 0.15s ease-out;
}

.search-dropdown-item {
    transition: background-color 0.1s ease-in-out;
}

.search-dropdown-item:hover {
    background-color: rgba(249, 250, 251, 1);
    /* gray-50 */
}

.search-dropdown-menu {
    animation: fadeIn 0.1s ease-out;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.search-dropdown-tab {
    transition: all 0.15s ease-in-out;
}

.search-dropdown-tab:hover {
    border-color: rgba(209, 213, 219, 1);
    /* gray-300 */
}

.search-dropdown-tab.active {
    color: rgba(37, 99, 235, 1);
    /* blue-600 */
    border-color: rgba(37, 99, 235, 1);
    /* blue-600 */
}

/* Customer Saved Searches Inline Expansion */
[data-web--customer-saved-searches-dropdown-target="inlineContent"] {
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
    overflow: hidden;
}

/* Remove conflicting animation classes - JavaScript handles transitions manually */

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Clean inline dropdown content styling - no shadows or backgrounds */
[data-web--customer-saved-searches-dropdown-target="inlineContent"] {
    /* Remove box-shadow for clean look */
}

/* Minimal transitions for inline content */
[data-web--customer-saved-searches-dropdown-target="inlineContent"] .space-y-4>* {
    transition: all 0.2s ease-in-out;
}

/* Remove hover transform effects for cleaner look */
[data-web--customer-saved-searches-dropdown-target="inlineContent"] button:hover {
    /* Remove transform for minimal styling */
}

/* Focus styles for inline content */
[data-web--customer-saved-searches-dropdown-target="inlineContent"] input:focus,
[data-web--customer-saved-searches-dropdown-target="inlineContent"] button:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Customer Saved Searches Dropdown Styles */
.customer-saved-searches-dropdown {
    animation: fadeIn 0.15s ease-out;
}

.customer-saved-searches-dropdown .loading-indicator {
    animation: fadeIn 0.2s ease-out;
}

/* Focus styles for better accessibility */
[data-web--customer-saved-searches-dropdown-target="dropdownButton"]:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

[data-web--customer-saved-searches-dropdown-target="dropdown"] button:focus,
[data-web--customer-saved-searches-dropdown-target="dropdown"] input:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 1px;
}

[data-web--customer-saved-searches-dropdown-target="mobileModal"] button:focus,
[data-web--customer-saved-searches-dropdown-target="mobileModal"] input:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 1px;
}

/* Loading spinner animation */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Improved mobile modal positioning */
@media (max-width: 768px) {
    [data-web--customer-saved-searches-dropdown-target="mobileModal"] {
        padding: 1rem;
    }

    [data-web--customer-saved-searches-dropdown-target="mobileModal"] .bg-white {
        max-height: 80vh;
        overflow-y: auto;
    }
}

/* Desktop dropdown positioning improvements */
@media (min-width: 769px) {
    [data-web--customer-saved-searches-dropdown-target="dropdown"] {
        max-height: 400px;
        overflow-y: auto;
    }
}

/* Hover states for better UX */
[data-web--customer-saved-searches-dropdown-target="dropdownButton"]:hover {
    background-color: rgba(243, 244, 246, 1);
    /* gray-100 */
}

/* Transition for dropdown visibility */
[data-web--customer-saved-searches-dropdown-target="dropdown"].hidden,
[data-web--customer-saved-searches-dropdown-target="mobileModal"].hidden {
    display: none !important;
}

[data-web--customer-saved-searches-dropdown-target="dropdown"]:not(.hidden) {
    animation: fadeIn 0.15s ease-out;
}

[data-web--customer-saved-searches-dropdown-target="mobileModal"]:not(.hidden) {
    animation: fadeIn 0.3s ease-out;
}

.toggle-label {
    transition: all 0.3s ease;
}

/* Edit mode styles */
.search-dropdown-item.editing {
    background-color: rgba(239, 246, 255, 1);
    /* blue-50 */
    border-left: 4px solid rgba(59, 130, 246, 1);
    /* blue-500 */
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .search-dropdown.mobile-fixed {
        position: fixed !important;
        top: auto;
        /* Will be set dynamically by JavaScript */
        left: 0 !important;
        right: 0 !important;
        width: 100vw !important;
        max-width: none;
        z-index: 50;
        margin-top: 0;
    }

    /* Fallback for non-mobile-fixed dropdowns */
    .search-dropdown:not(.mobile-fixed) {
        left: -1rem;
        right: -1rem;
        max-width: none;
    }
}

/* 3-Dot Button Styles */
.dropdown-button {
    transition: all 0.15s ease-in-out;
}

.dropdown-button:hover {
    background-color: rgba(243, 244, 246, 1);
    /* gray-100 */
    transform: scale(1.05);
}

.dropdown-button:focus {
    outline: none;
    ring: 2px solid rgba(59, 130, 246, 1);
    /* blue-500 */
    ring-offset: 2px;
}

.dropdown-button svg {
    transition: color 0.15s ease-in-out;
}

.dropdown-button:hover svg {
    color: rgba(55, 65, 81, 1);
    /* gray-700 */
}

/* Enhanced Mobile Modal Styles */
#mobile-confirm-popup {
    animation: fadeIn 0.3s ease-out;
    backdrop-filter: blur(4px);
}

#mobile-confirm-popup .bg-white {
    animation: slideUp 0.3s ease-out;
}

/* Loading and Disabled States */
.dropdown-item-loading {
    opacity: 0.6;
    pointer-events: none;
}

.dropdown-item-disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.toggle-checkbox:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.toggle-checkbox:disabled+.toggle-label {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Enhanced Dropdown Menu Animations */
.search-dropdown-menu.closing {
    animation: fadeOut 0.1s ease-in;
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

/* Delete Button Hover States */
.delete-button {
    transition: all 0.15s ease-in-out;
}

.delete-button:hover {
    background-color: rgba(254, 242, 242, 1);
    /* red-50 */
    color: rgba(185, 28, 28, 1);
    /* red-700 */
}

/* Mobile Modal Bottom Sheet Enhancement */
@media (max-width: 768px) {
    .mobile-modal-content {
        animation: slideUpModal 0.3s ease-out;
        transform-origin: bottom;
    }

    .mobile-modal-overlay {
        animation: fadeIn 0.3s ease-out;
    }
}

@keyframes slideUpModal {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Enhanced Focus States for Accessibility */
.search-dropdown-item:focus {
    outline: none;
    background-color: rgba(239, 246, 255, 1);
    /* blue-50 */
    ring: 2px solid rgba(59, 130, 246, 1);
    /* blue-500 */
    ring-offset: 1px;
}

/* Smooth Transitions for All Interactive Elements */
button,
input[type="checkbox"],
.toggle-label {
    transition: all 0.15s ease-in-out;
}

/* Enhanced Shadow for Desktop Dropdown */
.search-dropdown-menu {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Improved Mobile Toggle Switch Positioning */
@media (max-width: 768px) {
    .toggle-checkbox {
        top: 0;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .toggle-checkbox:checked {
        right: 0;
        border-color: #2563eb;
        background-color: #ffffff;
    }

    .toggle-label {
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
}

/* Notification Popup Enhancements */
#mobile-notification-popup .bg-white,
#mobile-confirm-popup .bg-white {
    max-height: 90vh;
    overflow-y: auto;
}

/* Responsive Text Sizing */
@media (max-width: 640px) {
    .search-dropdown-menu {
        font-size: 0.875rem;
        /* text-sm */
    }
}

/* Saved Searches List Width Enhancements */
#saved-searches-list ul {
    transition: all 0.3s ease-in-out;
}

/* Responsive width adjustments for saved searches */
@media (max-width: 640px) {
    #saved-searches-list ul {
        max-width: 100%;
        margin: 0 1rem;
    }
}

@media (min-width: 641px) and (max-width: 1024px) {
    #saved-searches-list ul {
        max-width: 3xl;
        /* 48rem */
    }
}

@media (min-width: 1025px) {
    #saved-searches-list ul {
        max-width: 4xl;
        /* 56rem */
    }
}

/* Enhanced spacing for wider saved searches list items */
#saved-searches-list li {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

@media (min-width: 640px) {
    #saved-searches-list li {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}
