/*!
 * Premium Casting Calls - Expandable Location CSS
 * 
 * Description: Advanced location dropdown with hierarchical structure
 * Version: 1.0.0
 * Author: NS33@castandcrew
 * License: GPL v2+
 * 
 * This file contains styles for:
 * - Hierarchical location dropdown (Country > Region > City)
 * - Details/summary elements with custom styling
 * - Advanced positioning and z-index management
 * - Browser marker reset and custom arrows
 * - Responsive location selection interface
 * - Done button and action controls
 * 
 * Dependencies: None
 * Enqueued on: Pages with location selection functionality
 */

/* CRITICAL: Remove all browser default details/summary markers FIRST */
details summary::-webkit-details-marker,
details.pcc-location-region summary::-webkit-details-marker,
.pcc-location-dropdown details summary::-webkit-details-marker,
.pcc-location-dropdown .pcc-region-title::-webkit-details-marker {
    display: none !important;
    content: none !important;
    width: 0 !important;
    height: 0 !important;
    position: absolute !important;
    visibility: hidden !important;
}

details summary::marker,
details.pcc-location-region summary::marker,
.pcc-location-dropdown details summary::marker,
.pcc-location-dropdown .pcc-region-title::marker {
    display: none !important;
    content: none !important;
    width: 0 !important;
    height: 0 !important;
    position: absolute !important;
    visibility: hidden !important;
}

/* Expandable Location Dropdown - Matching Design Theme - Fixed positioning context */
.pcc-expandable-location {
    position: relative;
    width: 100% !important;
    margin-bottom: 4px;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.05s ease, visibility 0.05s ease;
    box-sizing: border-box !important;
    display: block !important;
}

/* Hide location dropdown initially for synchronized timing */
.pcc-expandable-location.pcc-location-hidden {
    opacity: 0;
    visibility: hidden;
}

.pcc-location-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    user-select: none;
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    padding: 14px 18px;
    font-size: 0.95rem;
    line-height: 1.4;
    min-height: 48px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    position: relative;
    box-shadow: 
        0 2px 8px rgba(0, 86, 179, 0.08),
        inset 0 1px 2px rgba(0, 0, 0, 0.02);
}

.pcc-location-toggle::before {
    content: '';
    position: absolute;
    inset: -1px;
    background: linear-gradient(135deg, rgba(0, 86, 179, 0.1) 0%, transparent 50%);
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.pcc-location-toggle:hover {
    border-color: rgba(0, 86, 179, 0.4);
    transform: translateY(-2px);
    box-shadow: 
        0 4px 16px rgba(0, 86, 179, 0.15),
        0 2px 8px rgba(0, 0, 0, 0.08);
}

.pcc-location-toggle:hover::before {
    opacity: 1;
}

.pcc-location-toggle.active {
    border-color: #0056b3;
    transform: translateY(-2px);
    box-shadow: 
        0 4px 20px rgba(0, 86, 179, 0.25),
        0 2px 12px rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, #ffffff 0%, #f0f7ff 100%);
}

.pcc-location-display {
    flex: 1;
    color: #666666;
    font-weight: 500;
}

.pcc-location-display.has-selections {
    color: #0056b3;
    font-weight: 600;
}

.pcc-toggle-arrow {
    margin-left: 12px;
    font-size: 14px;
    color: #0056b3;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
}

.pcc-location-toggle.active .pcc-toggle-arrow {
    transform: rotate(180deg);
    color: #003d82;
}

.pcc-location-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    width: 100% !important;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 2px solid #0056b3;
    border-radius: 12px;
    max-height: 320px;
    min-width: 280px !important;
    max-width: none !important;
    overflow: hidden;
    z-index: 1000 !important;
    box-shadow: 
        0 8px 32px rgba(0, 86, 179, 0.2),
        0 4px 16px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(8px);
    box-sizing: border-box !important;
    position: absolute;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.98);
    transition: all 0.05s cubic-bezier(0.4, 0, 0.2, 1);
    touch-action: pan-y; /* Allow vertical touch but isolate it */
    display: flex;
    flex-direction: column;
}

/* Show dropdown when .show class is added */
.pcc-location-dropdown.show {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) scale(1) !important;
}

/* ==========================================================================
   Location Search Functionality
   ========================================================================== */

/* CRITICAL FIX: Force location dropdown to use full available space within its container */
.pcc-expandable-location {
    position: relative !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    display: block !important;
    margin: 0 !important;
    /* Don't span all grid columns - stay within assigned cell */
    flex: 1 1 auto !important; /* Flexible sizing in flexbox */
}

/* NUCLEAR OPTION: Force all location elements to use 100% width */
.pcc-expandable-location,
.pcc-expandable-location .pcc-location-toggle,
.pcc-expandable-location .pcc-location-dropdown,
.pcc-expandable-location .pcc-location-search,
.pcc-expandable-location .pcc-location-search-input {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
}

/* Override any Bootstrap column constraints */
.col-md-3 .pcc-expandable-location,
.col-md-4 .pcc-expandable-location,
.col-md-6 .pcc-expandable-location,
.col-md-12 .pcc-expandable-location {
    width: 100% !important;
    max-width: none !important;
}

/* Override any grid template constraints */
.pcc-filters-grid .pcc-expandable-location,
.pcc-filters-active .pcc-expandable-location {
    width: 100% !important;
    max-width: none !important;
    grid-column: span 1 !important; /* Stay within its grid cell but use full space */
}

/* PAGE-SPECIFIC OVERRIDES */

/* Submission and Edit pages: Inside .pcc-form-container > .mb-3 */
.pcc-form-container .mb-3 .pcc-expandable-location,
.pcc-form-container .mb-3 .pcc-location-toggle,
.pcc-form-container .mb-3 .pcc-location-dropdown,
.pcc-form-container .mb-3 .pcc-location-search,
.pcc-form-container .mb-3 .pcc-location-search-input {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
}

/* Category page: Inside .row > .col-md-3 */
.row .col-md-3 .pcc-expandable-location,
.row .col-md-3 .pcc-location-toggle,
.row .col-md-3 .pcc-location-dropdown,
.row .col-md-3 .pcc-location-search,
.row .col-md-3 .pcc-location-search-input {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
}

/* Force Bootstrap columns to not constrain content width */
.col-md-3 .pcc-expandable-location {
    position: relative !important;
    overflow: visible !important;
}

/* Ensure the dropdown can extend beyond column boundaries if needed */
.col-md-3 .pcc-location-dropdown {
    left: 0 !important;
    right: auto !important;
    min-width: 320px !important; /* Minimum usable width */
    width: max(100%, 320px) !important;
}

/* Location search container */
.pcc-location-search {
    position: relative;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(0, 86, 179, 0.1);
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    flex-shrink: 0; /* Prevent shrinking */
    width: 100% !important;
    box-sizing: border-box !important;
    display: block !important;
    margin: 0 !important;
    min-width: 200px !important; /* Ensure minimum usable width */
    max-width: none !important;
}

/* Location search container - final sizing */

/* Location search input */
.pcc-location-search-input {
    width: 100% !important;
    border: 2px solid #e1e8ed;
    border-radius: 10px;
    padding: 10px 40px 10px 16px; /* Extra right padding for clear button */
    font-size: 0.9rem;
    background: #ffffff;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 86, 179, 0.06);
    color: #333;
    font-weight: 500;
    box-sizing: border-box !important;
    max-width: none !important;
    min-width: 0 !important;
    min-height: 40px !important; /* Ensure minimum height */
}


.pcc-location-search-input:focus {
    border-color: #0056b3;
    background: #ffffff;
    outline: none;
    box-shadow: 
        0 0 0 3px rgba(0, 86, 179, 0.08),
        0 4px 12px rgba(0, 86, 179, 0.1);
    transform: translateY(-1px);
}

.pcc-location-search-input::placeholder {
    color: #8e8e8e;
    font-weight: 400;
}

/* Search clear button */
.pcc-search-clear {
    position: absolute !important;
    right: 24px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 20px !important;
    height: 20px !important;
    background: rgba(0, 86, 179, 0.1) !important;
    border: none !important;
    border-radius: 50% !important;
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    font-size: 14px !important;
    font-weight: bold !important;
    color: #666 !important;
    transition: all 0.3s ease !important;
    line-height: 1 !important;
    outline: none !important;
    padding: 0 !important;
    margin: 0 !important;
    flex-shrink: 0 !important;
}


.pcc-search-clear:hover {
    background: rgba(0, 86, 179, 0.2);
    color: #0056b3;
    transform: translateY(-50%) scale(1.1);
}

.pcc-search-clear:focus {
    outline: 2px solid #0056b3;
    outline-offset: 2px;
}

/* Show clear button when input has content - will be handled by JavaScript */
.pcc-search-clear.show {
    display: flex;
}

/* Active search state */
.pcc-location-search.searching {
    background: linear-gradient(135deg, #fff8e1 0%, #ffffff 100%);
    border-bottom-color: rgba(255, 193, 7, 0.3);
}

.pcc-location-search.searching .pcc-location-search-input {
    border-color: #ffc107;
    box-shadow: 
        0 0 0 3px rgba(255, 193, 7, 0.1),
        0 4px 12px rgba(255, 193, 7, 0.2);
}

/* Location Content Area - Scrollable with proper scroll isolation */
.pcc-location-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden !important; /* Prevent horizontal scrollbar */
    padding-bottom: 60px; /* Sufficient space for Done button (48px + margin) */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on mobile */
    overscroll-behavior: contain; /* Prevent scroll chaining */
    overscroll-behavior-y: contain; /* Specifically prevent vertical scroll chaining */
    scroll-behavior: smooth; /* Smooth scrolling */
    touch-action: pan-y; /* Only allow vertical scrolling on touch */
    max-height: 250px; /* Reduced to account for search box space */
}

/* Custom scrollbar styling for location dropdown - match main dropdowns */
.pcc-location-content::-webkit-scrollbar {
    width: 6px;
}

.pcc-location-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.pcc-location-content::-webkit-scrollbar-thumb {
    background: #0056b3;
    border-radius: 3px;
}

.pcc-location-content::-webkit-scrollbar-thumb:hover {
    background: #003d82;
}

/* Done Button - Account for location dropdown border */
.pcc-location-done-container {
    position: absolute !important;
    bottom: 2px !important; /* Account for 2px border */
    left: 2px !important; /* Account for 2px border */
    right: 2px !important; /* Account for 2px border */
    z-index: -1 !important; /* Behind content when hidden */
    pointer-events: none !important; /* Don't interfere when hidden */
    opacity: 0 !important;
    visibility: hidden !important;
    transition: all 0.3s ease !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    display: none !important; /* Completely remove when hidden */
}

/* Show Done button only when location dropdown is open */
.pcc-location-toggle.active ~ .pcc-location-dropdown.show .pcc-location-done-container {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important; /* Enable when visible */
    z-index: 1001 !important; /* Bring to front when visible */
    display: block !important; /* Show in layout when visible */
}

.pcc-location-done-btn {
    background: #0056b3 !important;
    color: white !important;
    border: none !important;
    padding: 16px 24px !important; /* Match dropdown option height */
    border-radius: 0 0 14px 14px !important; /* Slightly smaller to fit inside border */
    font-size: 16px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: none !important; /* Remove shadow that might cause thick line */
    display: block !important;
    width: 100% !important;
    visibility: visible !important;
    opacity: 1 !important;
    text-transform: none !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

.pcc-location-done-btn:hover {
    background: #003d82 !important;
    box-shadow: none !important; /* Remove shadow that causes thick line */
}

.pcc-location-done-btn:active {
    transform: translateY(0) !important;
}

@keyframes dropdownSlideIn {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Location Items - Matching Theme Design */
.pcc-location-item {
    padding: 16px 24px;
    color: #2c3e50;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    font-weight: 500;
    border-left: 4px solid transparent;
    background: linear-gradient(135deg, transparent 0%, rgba(0, 86, 179, 0.001) 100%);
}

.pcc-location-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: linear-gradient(135deg, #0056b3, #0066cc);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
    pointer-events: none;
    border-radius: 0;
}

.pcc-location-item:hover {
    background: linear-gradient(135deg, rgba(0, 86, 179, 0.06) 0%, rgba(0, 86, 179, 0.12) 100%);
    color: #0056b3;
    border-left-color: #0056b3;
    box-shadow: inset 0 1px 3px rgba(0, 86, 179, 0.1);
}

.pcc-location-item:hover::before {
    width: 4px;
}

.pcc-location-item:last-child {
    border-bottom: none;
}

.pcc-location-text {
    flex: 1;
    font-weight: 500;
}

/* Removed custom checkbox styling - now using real HTML checkboxes */

/* Remove custom hover/selected states - use native checkbox behavior */

/* Location dropdown production type framework styling */
.pcc-location-dropdown .pcc-dropdown-option {
    padding: 14px 24px 14px 48px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%);
    border-left: 3px solid transparent;
    color: #666666;
    font-weight: 500;
}

.pcc-location-dropdown .pcc-dropdown-option:hover {
    background: linear-gradient(135deg, rgba(0, 86, 179, 0.05) 0%, rgba(0, 86, 179, 0.02) 100%);
    border-left-color: #0056b3;
    color: #0056b3;
    font-weight: 600;
}

.pcc-location-dropdown .pcc-dropdown-option.pcc-selected {
    background: linear-gradient(135deg, rgba(0, 86, 179, 0.08) 0%, rgba(0, 86, 179, 0.04) 100%);
    border-left-color: #0056b3;
    color: #0056b3;
    font-weight: 600;
}

.pcc-location-dropdown .pcc-option-checkbox {
    margin-right: 12px;
    flex-shrink: 0;
}

.pcc-location-dropdown .pcc-option-text {
    flex: 1;
    font-weight: inherit;
}

/* Details/Summary Sections */
.pcc-location-section {
    border-bottom: 1px solid rgba(0, 86, 179, 0.08);
}

.pcc-location-section:last-child {
    border-bottom: none;
}

.pcc-section-title {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    background: linear-gradient(135deg, rgba(0, 86, 179, 0.06) 0%, rgba(0, 86, 179, 0.03) 100%);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    color: #0056b3;
    transition: all 0.25s ease;
    list-style: none;
    position: relative;
    border: none;
    margin: 0;
}

.pcc-section-title:hover {
    background: linear-gradient(135deg, rgba(0, 86, 179, 0.1) 0%, rgba(0, 86, 179, 0.05) 100%);
    color: #003d82;
}

.pcc-section-title::-webkit-details-marker {
    display: none;
}

.pcc-section-title::marker {
    display: none;
}

.pcc-section-title::before {
    content: "▶";
    margin-right: 12px;
    font-size: 11px;
    transition: transform 0.25s ease;
    color: #0056b3;
    display: inline-block;
    font-weight: 700;
    flex-shrink: 0;
    width: 14px;
    text-align: center;
}

/* Section title production type elements */
.pcc-section-title .pcc-option-checkbox {
    margin-right: 12px;
    flex-shrink: 0;
}

.pcc-section-title .pcc-option-text {
    flex: 1;
    font-weight: 700;
}

/* Show tick mark when country is selected */
.pcc-section-title.pcc-selected .pcc-option-checkbox {
    background: linear-gradient(135deg, #0056b3 0%, #0066cc 100%);
    border-color: #0056b3;
    color: #ffffff;
    box-shadow: 
        0 6px 16px rgba(0, 86, 179, 0.25),
        inset 0 1px 2px rgba(255, 255, 255, 0.8);
}

.pcc-section-title.pcc-selected .pcc-option-checkbox::after {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

/* Removed section custom checkbox styling - now using real HTML checkboxes */

/* Remove custom section hover/selected states - use native checkbox behavior */

/* Section titles now use production type structure - no custom styling needed */

details[open] .pcc-section-title::before {
    transform: rotate(90deg);
    color: #003d82;
}

/* Region Details - Clean Design with Higher Specificity */
.pcc-location-dropdown .pcc-location-region {
    background: #ffffff !important;
    margin: 0 !important;
    border: none !important;
}

.pcc-location-dropdown .pcc-location-region:last-child {
    border-bottom: none !important;
}

.pcc-location-dropdown .pcc-region-title {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    padding: 14px 20px !important;
    background: linear-gradient(135deg, rgba(0, 86, 179, 0.06) 0%, rgba(0, 86, 179, 0.03) 100%) !important;
    cursor: pointer !important;
    font-weight: 600 !important;
    font-size: 0.9rem !important;
    color: #0056b3 !important;
    transition: all 0.25s ease !important;
    list-style: none !important;
    position: relative !important;
    border: none !important;
    margin: 0 !important;
    min-height: 40px !important;
}

.pcc-location-dropdown .pcc-region-title:hover {
    background: linear-gradient(135deg, rgba(0, 86, 179, 0.1) 0%, rgba(0, 86, 179, 0.05) 100%) !important;
    color: #003d82 !important;
}

.pcc-location-dropdown .pcc-region-title::-webkit-details-marker {
    display: none !important;
}

.pcc-location-dropdown .pcc-region-title::marker {
    display: none !important;
}

/* NUCLEAR OPTION: COMPLETELY HIDE ALL BROWSER DEFAULT DETAILS MARKERS/TRIANGLES */

/* Target all possible details marker variations globally within location dropdown */
.pcc-location-dropdown details,
.pcc-location-dropdown details[open] {
    list-style: none !important;
    list-style-type: none !important;
    list-style-image: none !important;
    list-style-position: outside !important;
}

.pcc-location-dropdown summary,
.pcc-location-dropdown .pcc-region-title,
.pcc-location-dropdown .pcc-section-title {
    list-style: none !important;
    list-style-type: none !important;
    list-style-image: none !important;
    list-style-position: outside !important;
    position: relative !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

/* Keep our custom arrows - DO NOT hide :before pseudo-elements */
/* Our custom arrows use .pcc-section-title::before and .pcc-region-title::before */

/* ENSURE SUBMISSION AND EDIT PAGES WORK PROPERLY */
/* Force proper checkbox styling for hidden checkboxes */
.pcc-location-dropdown input[type="checkbox"] {
    position: absolute !important;
    left: -9999px !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

/* Ensure pcc-selected class properly shows checked state */
.pcc-location-dropdown .pcc-dropdown-option.pcc-selected {
    background: linear-gradient(135deg, rgba(0, 86, 179, 0.08) 0%, rgba(0, 86, 179, 0.04) 100%) !important;
    border-left-color: #0056b3 !important;
    color: #0056b3 !important;
    font-weight: 600 !important;
}
.pcc-location-dropdown details > summary {
    list-style: none !important;
    list-style-type: none !important;
}

.pcc-location-dropdown details > summary::-webkit-details-marker {
    display: none !important;
    content: none !important;
}

.pcc-location-dropdown details > summary::marker {
    display: none !important;
    content: none !important;
}

/* Target region titles specifically to remove default markers */
.pcc-location-dropdown .pcc-region-title {
    list-style: none !important;
    list-style-type: none !important;
}

.pcc-location-dropdown .pcc-region-title::-webkit-details-marker {
    display: none !important;
    content: none !important;
    width: 0 !important;
    height: 0 !important;
}

.pcc-location-dropdown .pcc-region-title::marker {
    display: none !important;
    content: none !important;
    width: 0 !important;
    height: 0 !important;
}

/* Force remove markers on all summary elements in location dropdown */
.pcc-location-dropdown summary {
    list-style: none !important;
    list-style-type: none !important;
}

.pcc-location-dropdown summary::-webkit-details-marker {
    display: none !important;
    content: none !important;
}

.pcc-location-dropdown summary::marker {
    display: none !important;
    content: none !important;
}

/* Remove any default borders/lines from details elements */
.pcc-location-dropdown details {
    border: none !important;
    border-left: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.pcc-location-dropdown details.pcc-location-region {
    border: none !important;
    border-left: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Region arrows - REMOVE BOX, KEEP ONLY ARROW */
.pcc-location-dropdown details.pcc-location-region .pcc-region-title::before,
.pcc-location-dropdown .pcc-location-region .pcc-region-title::before {
    content: "▶" !important;
    margin-right: 8px !important;
    font-size: 10px !important;
    transition: transform 0.25s ease !important;
    color: #0056b3 !important;
    display: inline-block !important;
    font-weight: 700 !important;
    flex-shrink: 0 !important;
    width: auto !important;
    height: auto !important;
    text-align: center !important;
    line-height: normal !important;
    vertical-align: middle !important;
    position: relative !important;
    top: 0px !important;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    padding: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* Only rotate to down arrow when the details element is actually open */
.pcc-location-dropdown details.pcc-location-region[open] > .pcc-region-title::before {
    transform: rotate(90deg) !important;
    color: #003d82 !important;
}

/* Region title elements */
.pcc-region-title .pcc-option-checkbox {
    margin-right: 12px;
    flex-shrink: 0;
}

.pcc-region-title .pcc-option-text {
    flex: 1;
    font-weight: 500;
    margin-left: 4px;
}

/* City Items - Clean and Simple */
.pcc-city {
    padding-left: 60px;
    font-size: 0.8rem;
    color: #666;
    background: #ffffff;
    font-weight: 400;
    border: none;
}

.pcc-city:hover {
    color: #0056b3;
    background: rgba(0, 86, 179, 0.05);
    font-weight: 500;
}

.pcc-featured {
    padding-left: 36px;
    background: #ffffff;
    color: #0056b3;
    font-weight: 500;
    border: none;
}

.pcc-featured:hover {
    background: rgba(0, 86, 179, 0.05);
    color: #003d82;
}

/* Responsive */
@media (max-width: 768px) {
    .pcc-location-dropdown {
        max-height: 280px;
        border-radius: 8px;
    }
    
    .pcc-location-toggle {
        padding: 12px 16px;
        min-height: 44px;
        border-radius: 8px;
    }
    
    /* Mobile search adjustments */
    .pcc-location-search {
        padding: 10px 12px;
    }
    
    .pcc-location-search-input {
        padding: 8px 36px 8px 12px;
        font-size: 0.85rem;
        border-radius: 8px;
    }
    
    .pcc-search-clear {
        right: 20px;
        width: 18px;
        height: 18px;
        font-size: 12px;
    }
    
    .pcc-location-content {
        max-height: 200px; /* Further reduced for mobile */
    }
    
    .pcc-location-item {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
    
    .pcc-section-title {
        padding: 14px 16px;
        font-size: 0.8rem;
    }
    
    .pcc-region-title {
        padding: 10px 16px 10px 28px;
        font-size: 0.85rem;
    }
    
    .pcc-city {
        padding-left: 40px;
        font-size: 0.8rem;
    }
    
    .pcc-featured {
        padding-left: 28px;
    }
}

/* Focus states for accessibility */
.pcc-location-item input[type="checkbox"]:focus {
    outline: 3px solid rgba(0, 86, 179, 0.4);
    outline-offset: 2px;
    box-shadow: 0 0 0 2px #ffffff, 0 0 8px rgba(0, 86, 179, 0.3);
}

.pcc-location-toggle:focus {
    outline: 3px solid rgba(0, 86, 179, 0.4);
    outline-offset: 2px;
    box-shadow: 0 0 0 2px #ffffff, 0 0 12px rgba(0, 86, 179, 0.4);
}

/* Enhanced interactions */
.pcc-location-item input[type="checkbox"]:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(0, 86, 179, 0.2);
}

details[open] > .pcc-section-title {
    background: linear-gradient(135deg, rgba(0, 86, 179, 0.1) 0%, rgba(0, 86, 179, 0.05) 100%);
}

/* Region open state - match country styling */
.pcc-location-dropdown details.pcc-location-region[open] > .pcc-region-title {
    background: linear-gradient(135deg, rgba(0, 86, 179, 0.1) 0%, rgba(0, 86, 179, 0.05) 100%) !important;
}

/* CRITICAL: Prevent text hiding/overlay issues */
.pcc-location-dropdown {
    position: absolute !important;
    z-index: 1000 !important;
    max-z-index: 1000 !important;
}

/* Ensure no elements can overshadow text with high z-index */
body *:not(.pcc-location-dropdown):not(.pcc-dropdown-menu) {
    max-z-index: 999 !important;
}

/* Force proper stacking context for location elements */
.pcc-expandable-location, 
.pcc-location-toggle, 
.pcc-dropdown-option {
    position: relative !important;
    z-index: auto !important;
}

/* Prevent any accidental overlays after selections */
.pcc-location-dropdown.pcc-dropdown-open {
    z-index: 1000 !important;
    position: absolute !important;
}

