/*!
 * Premium Casting Calls - Enhanced Filter Theme CSS
 * 
 * Description: Enhanced filter system and theme styling for the Premium Casting Calls plugin
 * Version: 1.0.0
 * Author: NS33@castandcrew
 * License: GPL v2+
 * 
 * This file contains enhanced styles for:
 * - Professional filter system with advanced dropdowns
 * - Custom dropdown components with search functionality
 * - Enhanced form controls and interactions
 * - Image upload and gallery systems
 * - Black and white theme with #0056b3 accents
 * - Mobile responsive design
 * 
 * Dependencies: None
 * Enqueued on: Front-end pages with filter functionality
 */

/* Black and White Premium Theme with #0056b3 Accents - Original Layout, Compact Sizing + ENHANCED FILTER BOX ONLY */

/* Hide select elements that will be converted to custom dropdowns to prevent ugly loading flash */
.pcc-production-type-select,
.pcc-gender-select:not(.character-section .pcc-gender-select),
.pcc-ethnicity-select:not(.character-section .pcc-ethnicity-select),
.pcc-compensation-select,
.pcc-union-status-select {
    opacity: 0 !important;
    visibility: hidden !important;
    position: absolute !important;
    z-index: -1 !important;
}

/* Prevent layout shifts during save search restoration */
.pcc-form-container {
    min-height: 200px; /* Reserve space to prevent jumping */
}

/* PROFESSIONAL FILTERS SYSTEM */
.pcc-filters-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0056b3 !important;
    color: #ffffff !important;
    border: none !important;
    padding: 12px 24px !important;
    border-radius: 12px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 12px rgba(0, 86, 179, 0.3) !important;
    letter-spacing: 0.5px !important;
    font-size: 0.9rem !important;
    text-decoration: none !important;
    cursor: pointer !important;
    margin-bottom: 20px;
    width: 100%;
    position: relative;
}

.pcc-filters-toggle:hover {
    background: #003d82 !important;
    color: #ffffff !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 20px rgba(0, 86, 179, 0.4) !important;
    text-decoration: none !important;
}


.pcc-filters-toggle .filter-count {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 4px 12px;
    margin-left: 12px;
    font-size: 0.85rem;
    font-weight: 700;
}

.pcc-filters-panel {
    display: none;
}

.pcc-filters-panel.pcc-panel-open {
    display: block;
}

.pcc-filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;
}

.pcc-filters-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #333;
    margin: 0;
}

.pcc-filters-close {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.9rem;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pcc-filters-close:hover {
    background: #e9ecef;
    color: #333;
}

.pcc-filters-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 768px) {
    .pcc-filters-grid {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
}

@media (min-width: 1024px) {
    .pcc-filters-grid {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 24px;
    }
}

/* Hide original dropdowns when filters system is active */
.pcc-filters-active .pcc-dropdown-container,
.pcc-filters-active .pcc-expandable-location {
    display: none;
}

/* Fast transitions for form updates */
.pcc-dropdown-container,
.pcc-expandable-location,
.pcc-select-display,
.pcc-location-display {
    transition: all 0.05s ease-out;
}

/* Fallback: Show selects if JavaScript fails or is disabled */
.no-js .pcc-production-type-select,
.no-js .pcc-gender-select,
.no-js .pcc-ethnicity-select,
.no-js .pcc-compensation-select,
.no-js .pcc-union-status-select,
.pcc-js-failed .pcc-production-type-select,
.pcc-js-failed .pcc-gender-select,
.pcc-js-failed .pcc-ethnicity-select,
.pcc-js-failed .pcc-compensation-select,
.pcc-js-failed .pcc-union-status-select {
    opacity: 1 !important;
    visibility: visible !important;
    position: static !important;
    z-index: auto !important;
}
body {
    background-color: #000000;
    color: #ffffff;
    font-family: 'Arial', sans-serif;
}

/* COMPACT: Reduced container sizes */
.pcc-form-container, .pcc-post-box, .pcc-manage-container {
    background: #ffffff;
    border: 1px solid #0056b3;
    border-radius: 12px;
    padding: 16px; /* Reduced from 20px */
    margin: 16px auto; /* Reduced from 20px */
    max-width: 900px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.pcc-post-box:hover, .pcc-manage-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* COMPACT: Reduced title sizes */
.pcc-form-container h2, 
.pcc-title, 
.pcc-short-desc h3, 
.pcc-full-desc h3, 
.pcc-post-box h3,
.pcc-manage-container h2,
.pcc-manage-container h3 {
    color: #0056b3;
    text-align: left;
    font-weight: 700;
    font-size: 1.4rem; /* Reduced from 1.75rem */
    margin-bottom: 16px; /* Reduced from 20px */
    text-transform: uppercase;
}

.pcc-short-desc h3, 
.pcc-full-desc h3, 
.pcc-post-box h3,
.pcc-manage-container h3 {
    font-size: 1.1rem; /* Reduced from 1.35rem */
    margin-top: 8px; /* Reduced from 10px */
    margin-bottom: 8px; /* Reduced from 10px */
}

.pcc-title a {
    color: #0056b3;
    text-decoration: none;
}

.pcc-title a:hover {
    color: #003d82;
    text-decoration: underline;
}

.pcc-post-date {
    float: right;
    font-size: 0.8rem; /* Reduced from 0.9rem */
    color: #666666;
    font-weight: normal;
}

/* ULTRA PREMIUM FILTER CONTAINER */
.pcc-filter-container {
    background: linear-gradient(135deg, #ffffff 0%, #fafbfc 50%, #f0f4f8 100%);
    padding: 40px;
    border-radius: 24px;
    margin-bottom: 40px;
    border: 3px solid transparent;
    background-clip: padding-box;
    box-shadow: 
        0 25px 80px rgba(0, 86, 179, 0.08),
        0 8px 25px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    position: relative;
    overflow: visible !important;
}

.pcc-filter-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #0056b3, #0066cc, #007bff, #0056b3);
    border-radius: 24px;
    padding: 3px;
    z-index: -1;
    background-size: 400% 400%;
    animation: gradientShift 8s ease infinite;
}

.pcc-filter-container::after {
    content: '';
    position: absolute;
    top: -60%;
    right: -30%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(0, 86, 179, 0.04) 0%, rgba(0, 102, 204, 0.02) 40%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    animation: float 6s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

/* ENHANCED PROFESSIONAL FORM CONTROLS - FILTER ONLY */
.pcc-filter-container .form-control, 
.pcc-filter-container .form-select {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    color: #2c3e50;
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 0.95rem;
    line-height: 1.4;
    height: 42px;
    max-height: 42px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    appearance: none;
    box-shadow: 
        0 2px 8px rgba(0, 86, 179, 0.08),
        inset 0 1px 2px rgba(0, 0, 0, 0.02);
    font-weight: 500;
    position: relative;
}

.pcc-filter-container .form-control:focus, 
.pcc-filter-container .form-select:focus {
    border-color: #0056b3;
    background: #ffffff;
    box-shadow: 
        0 0 0 4px rgba(0, 86, 179, 0.08),
        0 4px 20px rgba(0, 86, 179, 0.15);
    outline: none;
    transform: translateY(-1px);
}

.pcc-filter-container .form-control:hover, 
.pcc-filter-container .form-select:hover {
    border-color: #0066cc;
    box-shadow: 
        0 4px 12px rgba(0, 86, 179, 0.12),
        inset 0 1px 2px rgba(0, 0, 0, 0.02);
}

.pcc-filter-container .form-label {
    color: #1a2332;
    font-weight: 600;
    margin-bottom: 12px;
    font-size: 0.88rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    position: relative;
    display: block;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.pcc-filter-container .form-label::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, #0056b3, #0066cc, #007bff);
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0, 86, 179, 0.3);
}

/* REGULAR FORM CONTROLS - KEEP ORIGINAL */
.form-control, .form-select {
    background-color: #f8f9fa;
    color: #000000;
    border: 2px solid #0056b3;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 0.9rem;
    line-height: 1.4;
    height: 42px;
    max-height: 42px;
    transition: all 0.3s ease;
    appearance: none;
    box-shadow: 0 2px 8px rgba(0, 86, 179, 0.1);
    font-weight: 500;
}

.form-control:focus, .form-select:focus {
    border-color: #0056b3;
    box-shadow: 0 0 12px rgba(0, 86, 179, 0.4);
    outline: none;
    transform: translateY(-2px);
}

.form-label {
    color: #333333;
    font-weight: 700;
    margin-bottom: 8px; /* Reduced from 12px */
    font-size: 1rem; /* Reduced from 1.1rem */
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Expandable dropdown wrapper */
.pcc-expandable-dropdown {
    position: relative;
    width: 100%;
}

/* ENHANCED PROFESSIONAL CUSTOM DROPDOWN - NEW SYSTEM */
.pcc-dropdown-container {
    position: relative;
    width: 100%;
    margin-bottom: 4px;
}

.pcc-custom-select {
    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%;
    box-sizing: border-box;
    position: relative;
    box-shadow: 
        0 2px 8px rgba(0, 86, 179, 0.08),
        inset 0 1px 2px rgba(0, 0, 0, 0.02);
}

.pcc-custom-select::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, transparent 0%, rgba(0, 86, 179, 0.02) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.pcc-custom-select:hover {
    border-color: #0066cc;
    background: #ffffff;
    box-shadow: 
        0 4px 16px rgba(0, 86, 179, 0.12),
        inset 0 1px 2px rgba(0, 0, 0, 0.02);
    transform: translateY(-1px);
}

.pcc-custom-select:hover::before {
    opacity: 1;
}

.pcc-custom-select.pcc-active {
    border-color: #0056b3;
    background: #ffffff;
    box-shadow: 
        0 0 0 4px rgba(0, 86, 179, 0.08),
        0 8px 32px rgba(0, 86, 179, 0.15);
    transform: translateY(-1px);
}

.pcc-custom-select.pcc-active::before {
    opacity: 1;
}

.pcc-select-display {
    flex: 1;
    color: #666666;
    font-size: 0.95rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pcc-select-display.pcc-placeholder {
    color: #666666;
    font-weight: 500;
}

/* Style when selections are made - match location dropdown */
.pcc-select-display:not(.pcc-placeholder) {
    color: #0056b3;
    font-weight: 600;
}

.pcc-select-arrow {
    width: 20px;
    height: 20px;
    margin-left: 12px;
    color: #0056b3;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

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

/* ENHANCED PROFESSIONAL DROPDOWN MENU */
.pcc-dropdown-container {
    position: relative !important;
}

.pcc-dropdown-menu {
    position: absolute !important;
    top: calc(100% + 8px) !important;
    left: 0 !important;
    right: 0 !important;
    background: #ffffff;
    border: 2px solid #0056b3;
    border-radius: 16px;
    margin-top: 0;
    z-index: -1 !important; /* Behind content when hidden */
    max-height: 400px !important;
    overflow: hidden !important; /* Hide all overflow to prevent scrollbars */
    overflow-x: hidden !important; /* Explicitly hide horizontal scrollbar */
    box-shadow: 
        0 20px 60px rgba(0, 86, 179, 0.15),
        0 8px 20px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px) scale(0.95);
    transition: all 0.05s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    width: 100% !important;
    min-width: 280px !important;
    max-width: 100% !important;
    position: relative; /* For Done button positioning */
    pointer-events: none !important; /* Don't block clicks when hidden */
}






.pcc-dropdown-menu::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #0056b3, #0066cc, #0056b3);
    border-radius: 16px 16px 0 0;
    z-index: 2;
    pointer-events: none;
}

.pcc-dropdown-menu.pcc-show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    z-index: 999999 !important; /* High z-index when visible */
    pointer-events: auto !important; /* Enable clicks when visible */
}

/* ENHANCED DROPDOWN SEARCH */
.pcc-dropdown-search {
    padding: 16px;
    border-bottom: 1px solid #e9ecef;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.pcc-dropdown-search input {
    width: 100%;
    border: 2px solid #e1e8ed;
    border-radius: 10px;
    padding: 10px 16px;
    font-size: 0.9rem;
    background: #ffffff;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 86, 179, 0.06);
}

.pcc-dropdown-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);
}

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

/* ENHANCED DROPDOWN OPTIONS - Default for single-select */
.pcc-dropdown-options {
    padding: 8px 0 !important; /* No extra bottom padding for single-select dropdowns */
    max-height: none !important;
    overflow: visible !important;
    overflow-x: hidden !important; /* Prevent horizontal scrollbar */
}

/* Multi-select dropdowns need bottom padding for Done button */
.pcc-dropdown-menu[data-multi="true"] .pcc-dropdown-options {
    padding: 8px 0 80px 0 !important; /* Bottom padding for Done button */
}

.pcc-dropdown-option {
    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-dropdown-option::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-dropdown-option: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;
    /* Removed transform: translateX(3px) to prevent horizontal scrollbar */
    box-shadow: inset 0 1px 3px rgba(0, 86, 179, 0.1);
}

.pcc-dropdown-option:hover::before {
    width: 4px;
}

.pcc-dropdown-option.pcc-selected {
    background: linear-gradient(135deg, rgba(0, 86, 179, 0.08) 0%, rgba(0, 86, 179, 0.15) 100%);
    color: #0056b3;
    font-weight: 600;
    border-left-color: #0056b3;
    box-shadow: 
        inset 0 1px 3px rgba(0, 86, 179, 0.15),
        0 2px 8px rgba(0, 86, 179, 0.1);
}

.pcc-dropdown-option.pcc-selected::before {
    width: 4px;
}

.pcc-dropdown-option.pcc-disabled {
    color: #c7c7c7;
    cursor: not-allowed;
    opacity: 0.5;
    background: rgba(248, 249, 250, 0.5);
}

.pcc-dropdown-option.pcc-disabled:hover {
    background: rgba(248, 249, 250, 0.5);
    border-left-color: transparent;
    transform: none;
    box-shadow: none;
}

.pcc-dropdown-option.pcc-disabled::before {
    display: none;
}

/* ENHANCED OPTION CHECKBOX FOR MULTI-SELECT */
.pcc-option-checkbox {
    width: 22px;
    height: 22px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    margin-left: 16px;
    margin-right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    box-shadow: 
        0 2px 6px rgba(0, 86, 179, 0.08),
        inset 0 1px 2px rgba(255, 255, 255, 0.8);
    flex-shrink: 0;
    order: 2;
}

.pcc-dropdown-option:hover .pcc-option-checkbox {
    border-color: #0056b3;
    box-shadow: 
        0 4px 12px rgba(0, 86, 179, 0.15),
        inset 0 1px 2px rgba(255, 255, 255, 0.8);
    transform: scale(1.05);
}

.pcc-dropdown-option.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 3px rgba(255, 255, 255, 0.3);
    transform: scale(1.08);
}

.pcc-option-checkbox::after {
    content: '✓';
    font-size: 14px;
    font-weight: 900;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: scale(0.6) rotate(-15deg);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

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

/* OPTION TEXT */
.pcc-option-text {
    flex: 1;
    text-align: left;
    order: 1;
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* ENHANCED OPTION GROUPS */
.pcc-option-group {
    padding: 12px 20px 8px;
    color: #0056b3;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #e1e8ed;
    position: sticky;
    top: 0;
    z-index: 10;
}

/* HIDE SELECTION TAGS */
.pcc-selection-tags {
    display: none !important;
}

/* Full Width Done Button - Account for dropdown border */
.pcc-dropdown-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 dropdown is open */
.pcc-dropdown-container.open .pcc-dropdown-done-container,
.pcc-dropdown-menu.pcc-show .pcc-dropdown-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-dropdown-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-dropdown-done-btn:hover {
    background: #003d82 !important;
    box-shadow: none !important; /* Remove shadow that causes thick line */
}

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

/* ================================
   CUSTOM DROPDOWN SYSTEM - FRESH START
   ================================ */

.pcc-custom-dropdown {
    position: relative;
    width: 100%;
    font-family: 'Arial', sans-serif;
}

/* Dropdown Toggle Button - Ensure proper text display */
.pcc-dropdown-toggle {
    background-color: #f8f9fa !important;
    color: #000000 !important;
    border: 2px solid #0056b3 !important;
    border-radius: 12px !important;
    padding: 12px 16px !important;
    font-size: 0.9rem !important;
    line-height: 1.5 !important;
    min-height: 44px !important;
    height: auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 8px rgba(0, 86, 179, 0.1) !important;
    font-weight: 500 !important;
    user-select: none !important;
    position: relative !important;
    overflow: visible !important;
}

.pcc-dropdown-toggle:hover {
    border-color: #003d82;
    box-shadow: 0 4px 12px rgba(0, 86, 179, 0.2);
    transform: translateY(-1px);
}

.pcc-dropdown-toggle.active {
    border-color: #0056b3;
    box-shadow: 0 0 12px rgba(0, 86, 179, 0.4);
    transform: translateY(-2px);
}

/* Ultra-specific override to beat any external CSS */
html body .container .pcc-filter-container .pcc-custom-dropdown .pcc-dropdown-toggle .pcc-dropdown-text,
html body div .pcc-filter-container .pcc-custom-dropdown .pcc-dropdown-toggle .pcc-dropdown-text,
.pcc-filter-container .pcc-custom-dropdown .pcc-dropdown-toggle .pcc-dropdown-text {
    flex: 1 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    color: #000000 !important;
    font-weight: 500 !important;
    opacity: 1 !important;
    background: none !important;
    background-color: transparent !important;
    background-image: none !important;
    border: none !important;
    box-shadow: none !important;
    text-shadow: none !important;
    font-family: 'Arial', sans-serif !important;
    font-size: 0.9rem !important;
    line-height: 1.5 !important;
    text-decoration: none !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    word-spacing: normal !important;
    display: block !important;
    visibility: visible !important;
    position: relative !important;
    z-index: 1 !important;
    min-height: 1.5em !important;
    height: auto !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

html body .container .pcc-filter-container .pcc-custom-dropdown .pcc-dropdown-toggle .pcc-dropdown-text.placeholder,
html body div .pcc-filter-container .pcc-custom-dropdown .pcc-dropdown-toggle .pcc-dropdown-text.placeholder,
.pcc-filter-container .pcc-custom-dropdown .pcc-dropdown-toggle .pcc-dropdown-text.placeholder {
    color: #666666 !important;
    font-weight: 400 !important;
    opacity: 1 !important;
}

/* Dropdown Arrow */
.pcc-dropdown-arrow {
    color: #0056b3;
    font-size: 12px;
    font-weight: bold;
    margin-left: 12px;
    transition: transform 0.3s ease;
    line-height: 1;
}

.pcc-custom-dropdown.open .pcc-dropdown-arrow {
    transform: rotate(180deg);
}

/* Dropdown Menu Container - Clean structure */
.pcc-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border: 2px solid #0056b3;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 86, 179, 0.2);
    z-index: 1000;
    margin-top: 4px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    max-height: 300px;
    overflow-y: auto;
}

.pcc-custom-dropdown.open .pcc-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Search Input */
.pcc-dropdown-search {
    padding: 12px;
    border-bottom: 1px solid #e9ecef;
    background: #f8f9fa;
}

.pcc-search-input {
    width: 100%;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.85rem;
    background: #ffffff;
    color: #000000;
    outline: none;
    transition: all 0.2s ease;
}

.pcc-search-input:focus {
    border-color: #0056b3;
    box-shadow: 0 0 0 2px rgba(0, 86, 179, 0.2);
}

.pcc-search-input::placeholder {
    color: #6c757d;
    font-style: italic;
}

/* Dropdown Options Container - Default for single-select */
.pcc-dropdown-options {
    max-height: 320px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important; /* Prevent horizontal scrollbar */
    flex: 1 !important;
    padding: 8px 0 !important; /* No extra padding for single-select */
}

/* Multi-select dropdowns need space for Done button */
.pcc-dropdown-menu[data-multi="true"] .pcc-dropdown-options {
    padding: 8px 0 80px 0 !important; /* Space for Done button */
}

/* Dropdown Groups */
.pcc-dropdown-group {
    border-top: 1px solid #e9ecef;
}

.pcc-dropdown-group:first-child {
    border-top: none;
}

.pcc-dropdown-group-label {
    background: #e9ecef;
    color: #495057;
    font-weight: 700;
    padding: 10px 16px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #dee2e6;
}

/* Dropdown Options */
.pcc-dropdown-option {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
}

.pcc-dropdown-option:last-child {
    border-bottom: none;
}

.pcc-dropdown-option:hover {
    background: rgba(0, 86, 179, 0.05);
    color: #0056b3;
}

.pcc-dropdown-option.selected {
    background: rgba(0, 86, 179, 0.1);
    color: #0056b3;
    font-weight: 600;
}

.pcc-dropdown-option.hidden {
    display: none;
}

/* Checkbox and Radio Styling */
.pcc-dropdown-option input[type="checkbox"],
.pcc-dropdown-option input[type="radio"] {
    width: 18px;
    height: 18px;
    margin-right: 12px;
    accent-color: #0056b3;
    cursor: pointer;
}

.pcc-dropdown-option label {
    flex: 1;
    cursor: pointer;
    margin: 0;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.4;
    color: inherit;
}

.pcc-dropdown-option input[type="checkbox"]:checked + label,
.pcc-dropdown-option input[type="radio"]:checked + label {
    font-weight: 600;
    color: #0056b3;
}


/* Force all pseudo-elements removal on dropdown elements */
.pcc-custom-dropdown *::before,
.pcc-custom-dropdown *::after,
.pcc-dropdown-toggle *::before,
.pcc-dropdown-toggle *::after,
.pcc-dropdown-text::before,
.pcc-dropdown-text::after {
    display: none !important;
    content: none !important;
    background: none !important;
    background-color: transparent !important;
    background-image: none !important;
}

/* Remove all pseudo-elements that might interfere */
.pcc-dropdown-text::before,
.pcc-dropdown-text::after,
.pcc-dropdown-toggle::before,
.pcc-dropdown-toggle::after {
    display: none !important;
    content: none !important;
}

/* Remove all counter pseudo-elements */
.pcc-multi-select .pcc-dropdown-text::after,
.pcc-dropdown-text::after,
.pcc-dropdown-text.has-selections::after {
    display: none !important;
    content: none !important;
}

/* Hide any other counter displays */
.pcc-dropdown-text .counter,
.pcc-dropdown-text .count,
.pcc-dropdown-text [data-count] {
    display: none !important;
}

/* Scrollbar Styling */
.pcc-dropdown-menu::-webkit-scrollbar,
.pcc-dropdown-options::-webkit-scrollbar {
    width: 6px;
}

.pcc-dropdown-menu::-webkit-scrollbar-track,
.pcc-dropdown-options::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.pcc-dropdown-menu::-webkit-scrollbar-thumb,
.pcc-dropdown-options::-webkit-scrollbar-thumb {
    background: #0056b3;
    border-radius: 3px;
}

.pcc-dropdown-menu::-webkit-scrollbar-thumb:hover,
.pcc-dropdown-options::-webkit-scrollbar-thumb:hover {
    background: #003d82;
}

/* Loading State */
.pcc-custom-dropdown.loading .pcc-dropdown-toggle {
    opacity: 0.7;
    pointer-events: none;
}

.pcc-custom-dropdown.loading .pcc-dropdown-arrow {
    animation: spin 1s linear infinite;
}

/* Fix cursor for dropdown toggle */
.pcc-dropdown-toggle {
    cursor: pointer !important;
}

.pcc-dropdown-toggle * {
    cursor: pointer !important;
}

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

/* Disabled State */
.pcc-custom-dropdown.disabled {
    opacity: 0.6;
    pointer-events: none;
}

.pcc-custom-dropdown.disabled .pcc-dropdown-toggle {
    background-color: #e9ecef;
    border-color: #dee2e6;
    color: #6c757d;
    cursor: not-allowed;
}

/* Error State */
.pcc-custom-dropdown.error .pcc-dropdown-toggle {
    border-color: #dc3545;
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.2);
}

/* COMPACT: Reduced button sizes */
.pcc-btn {
    background: #0056b3 !important;
    color: #ffffff !important;
    border: none !important;
    padding: 12px 24px !important; /* Reduced from 16px 32px */
    border-radius: 12px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 12px rgba(0, 86, 179, 0.3) !important;
    letter-spacing: 0.5px !important;
    font-size: 0.9rem !important; /* Reduced from 1rem */
    text-decoration: none !important;
    display: inline-block !important;
    cursor: pointer !important;
}

.pcc-btn:hover {
    background: #003d82 !important;
    color: #ffffff !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 20px rgba(0, 86, 179, 0.4) !important;
    text-decoration: none !important;
}

.pcc-btn:focus, .pcc-btn:active {
    background: #003d82 !important;
    color: #ffffff !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.3) !important;
}

.pcc-manage-btn {
    background: #0056b3 !important;
    color: #ffffff !important;
    border: none !important;
    padding: 10px 16px !important; /* Reduced from 12px 20px */
    border-radius: 8px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 12px rgba(0, 86, 179, 0.2) !important;
    letter-spacing: 0.5px !important;
    text-decoration: none !important;
    display: inline-block !important;
    cursor: pointer !important;
}

.pcc-manage-btn:hover {
    background: #003d82 !important;
    color: #ffffff !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(0, 86, 179, 0.3) !important;
    text-decoration: none !important;
}

.pcc-manage-btn:focus, .pcc-manage-btn:active {
    background: #003d82 !important;
    color: #ffffff !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.3) !important;
}

.btn-success, .btn-danger, .btn-secondary {
    padding: 12px 20px !important; /* Reduced from 16px 24px */
    border-radius: 12px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    border: none !important;
    color: #ffffff !important;
    text-decoration: none !important;
    display: inline-block !important;
    cursor: pointer !important;
}

.btn-success {
    background: #28a745 !important;
}

.btn-success:hover {
    background: #1e7e34 !important;
    color: #ffffff !important;
    transform: translateY(-2px) !important;
    text-decoration: none !important;
}

.btn-danger {
    background: #dc3545 !important;
}

.btn-danger:hover {
    background: #c82333 !important;
    color: #ffffff !important;
    transform: translateY(-2px) !important;
    text-decoration: none !important;
}

.btn-secondary {
    background: #6c757d !important;
}

.btn-secondary:hover {
    background: #5a6268 !important;
    color: #ffffff !important;
    transform: translateY(-2px) !important;
    text-decoration: none !important;
}

.btn-sm {
    padding: 8px 14px !important; /* Reduced from 10px 18px */
    font-size: 0.8rem !important; /* Reduced from 0.875rem */
}

/* COMPACT: Enhanced form sections */
.character-section {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 16px; /* Reduced from 20px */
    border-radius: 12px;
    border: 2px solid #0056b3;
    margin-bottom: 16px; /* Reduced from 20px */
    box-shadow: 0 4px 12px rgba(0, 86, 179, 0.1);
}

.pcc-short-desc, .pcc-full-desc p {
    color: #666666;
    font-size: 0.9rem; /* Reduced from 1rem */
    line-height: 1.6;
    margin-bottom: 12px; /* Reduced from 15px */
}

/* FIXED: Single Post Page - Match Category Page Spacing */
.single-post .pcc-post-box .pcc-details,
.single .pcc-post-box .pcc-details {
    margin-bottom: 6px !important; /* Reduced from 8px */
    padding: 0 !important;
}

.single-post .pcc-post-box .pcc-details p,
.single .pcc-post-box .pcc-details p {
    font-size: 0.85rem !important; /* Reduced from 0.95rem */
    color: #333333 !important;
    margin-bottom: 2px !important; /* Reduced from 3px */
    padding: 0 !important;
    line-height: 1.4 !important;
}

.pcc-details {
    margin-bottom: 6px; /* Reduced from 8px */
    padding: 0;
}

.pcc-details p {
    font-size: 0.85rem; /* Reduced from 0.95rem */
    color: #333333;
    margin-bottom: 4px; /* Reduced from 6px */
    padding: 0;
}

.pcc-character-list {
    list-style: none;
    padding: 0;
}

.pcc-character-list li {
    background: linear-gradient(135deg, #f5f5f5, #e9ecef);
    padding: 12px; /* Reduced from 16px */
    border-radius: 12px;
    margin-bottom: 10px; /* Reduced from 12px */
    color: #333333;
    border: 1px solid #0056b3;
    box-shadow: 0 2px 8px rgba(0, 86, 179, 0.1);
}

.alert {
    margin-top: 16px; /* Reduced from 20px */
    border-radius: 12px;
    padding: 12px 16px; /* Reduced from 16px 20px */
    font-weight: 500;
}

.save-search-label {
    color: #000000;
    margin-right: 10px; /* Reduced from 12px */
    font-size: 0.9rem; /* Reduced from 1rem */
    display: inline-block;
    vertical-align: middle;
    font-weight: 600;
}

#save-search {
    vertical-align: middle;
    margin-right: 10px; /* Reduced from 12px */
    transform: scale(1.1); /* Reduced from 1.2 */
}

/* ENHANCED ICON STYLING */
.pcc-icon {
    margin-right: 6px; /* Reduced from 8px */
    color: #0056b3;
    font-size: 1rem; /* Reduced from 1.1rem */
}

.pcc-details .fas.fa-video,
.pcc-details .fas.fa-map-marker-alt,
.pcc-details .fas.fa-money-bill,
.pcc-details .fas.fa-handshake,
.pcc-details .fas.fa-venus-mars,
.pcc-details .fas.fa-globe,
.pcc-details .fas.fa-users,
.pcc-details .fas.fa-calendar,
.pcc-details .fas.fa-clock {
    color: #0056b3;
}

/* Date input styling */
input[type="date"] {
    background-color: #f8f9fa;
    color: #000000;
    border: 2px solid #0056b3;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 0.9rem;
    line-height: 1.5;
    min-height: 44px;
    height: auto;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 86, 179, 0.1);
    font-weight: 500;
    width: 100%;
}

input[type="date"]:focus {
    border-color: #0056b3;
    box-shadow: 0 0 12px rgba(0, 86, 179, 0.4);
    outline: none;
    transform: translateY(-2px);
}

/* ENHANCED REAL-TIME IMAGE UPLOAD STYLES */

.pcc-image-upload-zone {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 2px dashed #0056b3;
    border-radius: 16px;
    padding: 20px;
    margin: 16px 0;
    transition: all 0.3s ease;
}

.pcc-upload-area {
    text-align: center;
    padding: 40px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.5);
}

.pcc-upload-area:hover {
    background: rgba(0, 86, 179, 0.05);
    transform: translateY(-2px);
}

.pcc-upload-area.pcc-drag-active {
    background: rgba(0, 86, 179, 0.1);
    border-color: #003d82;
    transform: scale(1.02);
}

.pcc-upload-area i {
    font-size: 3rem;
    color: #0056b3;
    margin-bottom: 16px;
    display: block;
}

.pcc-upload-area p {
    font-size: 1.1rem;
    color: #333;
    margin: 0 0 8px 0;
    font-weight: 600;
}

.pcc-upload-area small {
    color: #666;
    font-size: 0.9rem;
}

.pcc-image-gallery-container {
    margin-top: 24px;
}

.pcc-image-gallery-container h4 {
    color: #0056b3;
    font-size: 1.1rem;
    margin-bottom: 16px;
    font-weight: 700;
    text-transform: uppercase;
}

.pcc-image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.pcc-image-item {
    background: #ffffff;
    border: 2px solid #0056b3;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 86, 179, 0.1);
}

.pcc-image-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 86, 179, 0.2);
}

.pcc-image-item.pcc-upload-complete {
    border-color: #28a745;
}

.pcc-image-item.pcc-upload-error {
    border-color: #dc3545;
}

.pcc-image-container {
    position: relative;
    height: 200px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
}

.pcc-preview-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: all 0.3s ease;
    border-radius: 8px;
}

.pcc-image-item:hover .pcc-preview-image {
    transform: scale(1.05);
}

.pcc-upload-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    padding: 12px;
    color: white;
}

.pcc-progress-bar {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    overflow: hidden;
    height: 8px;
    margin-bottom: 8px;
}

.pcc-progress-fill {
    background: linear-gradient(90deg, #0056b3, #28a745);
    height: 100%;
    transition: width 0.3s ease;
    border-radius: 8px;
}

.pcc-progress-text {
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    display: block;
}

.pcc-upload-status {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.pcc-status-uploading {
    animation: spin 1s linear infinite;
    color: #0056b3;
}

.pcc-status-success {
    color: #28a745;
}

.pcc-status-error {
    color: #dc3545;
}

.pcc-image-info {
    padding: 12px 16px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.pcc-file-name {
    display: block;
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pcc-file-size {
    color: #666;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Image delete buttons - shared styles */
.pcc-remove-image,
.pcc-remove-existing-image,
.pcc-remove-existing {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    z-index: 10;
    font-size: 0.8rem;
}

/* New upload delete button is slightly larger */
.pcc-remove-image {
    width: 32px;
    height: 32px;
    transform: scale(0.8);
}

.pcc-remove-image i {
    font-size: 0.9rem;
}

/* Reveal on hover */
.pcc-image-item:hover .pcc-remove-image {
    opacity: 1;
    transform: scale(1);
}

.pcc-existing-image-wrapper:hover .pcc-remove-existing-image,
.pcc-existing-image-item:hover .pcc-remove-existing {
    opacity: 1;
}

/* Hover state */
.pcc-remove-image:hover,
.pcc-remove-existing-image:hover,
.pcc-remove-existing:hover {
    background: #dc3545;
    transform: scale(1.1);
}

/* Existing images for edit mode */
.pcc-existing-image-wrapper {
    position: relative;
    display: inline-block;
    margin: 8px;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.pcc-existing-image-wrapper:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 86, 179, 0.2);
}

.pcc-existing-image-wrapper img {
    max-width: 200px;
    max-height: 200px;
    width: auto;
    height: auto;
    display: block;
    border: 2px solid #0056b3;
    border-radius: 12px;
}

/* Success and error states */
.pcc-upload-complete .pcc-image-info {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    border-top-color: #28a745;
}

.pcc-upload-error .pcc-image-info {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    border-top-color: #dc3545;
}

/* Loading animation for upload area */
.pcc-upload-area.pcc-processing {
    pointer-events: none;
    opacity: 0.7;
}

.pcc-upload-area.pcc-processing i {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ENHANCED: Better Image Gallery Display */
.pcc-image-gallery {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 16px !important;
    margin-top: 16px !important;
    justify-content: flex-start !important;
    align-items: flex-start !important;
    padding: 0 !important;
    background: none !important;
    border-radius: 0 !important;
    border: none !important;
}

.pcc-casting-image {
    max-width: 300px !important;
    max-height: 300px !important;
    min-width: 240px !important;
    min-height: 180px !important;
    width: auto !important;
    height: auto !important;
    object-fit: cover !important;
    border-radius: 16px !important;
    border: 3px solid #0056b3 !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 6px 16px rgba(0, 86, 179, 0.15) !important;
    cursor: pointer !important;
    background: #ffffff !important;
}

.pcc-casting-image:hover {
    transform: scale(1.08) translateY(-8px) !important;
    box-shadow: 0 12px 28px rgba(0, 86, 179, 0.25) !important;
    border-color: #003d82 !important;
    z-index: 5 !important;
}

.pcc-casting-image:active {
    transform: scale(1.15) !important;
    transition: transform 0.1s ease !important;
}

/* Image Modal */
.pcc-image-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    overflow: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pcc-modal-content {
    position: relative;
    max-width: 60%;
    max-height: 80%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pcc-modal-image {
    max-width: 100%;
    max-height: 80vh;
    width: auto;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    object-fit: contain;
}

.pcc-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #dc3545;
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    z-index: 10000;
}

.pcc-modal-close:hover {
    background: #c82333;
    transform: scale(1.1);
}

/* Mobile specific modal styles */
@media (max-width: 768px) {
    .pcc-modal-content {
        max-width: 90%;
        max-height: 70%;
    }
    
    .pcc-modal-image {
        max-height: 60vh;
    }
    
    .pcc-modal-close {
        top: 8px;
        right: 8px;
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
}

.pcc-no-results {
    color: #dc3545;
    font-size: 1rem !important; /* Reduced from 1.1rem */
    font-weight: 600;
}

/* ENHANCED JOB MANAGEMENT PAGE */
.pcc-manage-container {
    animation: fadeIn 0.6s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.pcc-manage-sections {
    margin-top: 20px; /* Reduced from 24px */
}

.pcc-section {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 16px;
    padding: 20px; /* Reduced from 24px */
    margin-bottom: 20px; /* Reduced from 24px */
    box-shadow: 0 8px 20px rgba(0, 86, 179, 0.1);
    transition: all 0.3s ease;
    border: 2px solid #0056b3;
}

.pcc-section:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 28px rgba(0, 86, 179, 0.15);
}

.pcc-jobs-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 86, 179, 0.1);
}

.pcc-jobs-table th,
.pcc-jobs-table td {
    padding: 12px; /* Reduced from 16px */
    text-align: left;
    color: #333333;
    border-bottom: 1px solid #e0e0e0;
}

.pcc-jobs-table th {
    background: linear-gradient(135deg, #0056b3, #003d82);
    color: #ffffff;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pcc-jobs-table tr:nth-child(even) {
    background: linear-gradient(135deg, #f9f9f9, #f5f5f5);
}

/* Fix overlapping buttons in manage page */
.pcc-jobs-table .btn-group {
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    min-width: 120px !important;
}

.pcc-jobs-table .btn-group .btn {
    font-size: 0.75rem !important;
    padding: 4px 8px !important;
    white-space: nowrap !important;
    text-align: center !important;
}

/* Better "View All Casting Calls" Button */
.pcc-view-all-btn {
    background: #0056b3 !important;
    color: #ffffff !important;
    border: none !important;
    padding: 6px 12px !important; /* Reduced from 8px 16px */
    border-radius: 6px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    transition: all 0.3s ease !important;
    text-decoration: none !important;
    display: inline-block !important;
    cursor: pointer !important;
    font-size: 0.8rem !important; /* Reduced from 0.875rem */
}

.pcc-view-all-btn:hover {
    background: #003d82 !important;
    color: #ffffff !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(0, 86, 179, 0.3) !important;
    text-decoration: none !important;
}

/* Desktop: Keep original single-line layout */
@media (min-width: 769px) {
    .col-md-12.text-end {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
        gap: 15px !important;
    }
    
    .save-search-container {
        display: flex !important;
        align-items: center !important;
    }
    
    .buttons-container {
        display: flex !important;
        gap: 10px !important;
    }
}

/* Mobile-specific layout for Save Search section */
@media (max-width: 768px) {
    /* Container for the save search section */
    .col-md-12.text-end {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        text-align: left !important;
        gap: 12px !important;
    }
    
    /* First line: Save search label and checkbox */
    .save-search-container {
        display: flex !important;
        align-items: center !important;
        width: 100% !important;
        margin-bottom: 0 !important;
    }
    
    .save-search-label {
        margin-right: 10px !important;
        margin-bottom: 0 !important;
        font-size: 0.9rem !important;
        display: inline-block !important;
        vertical-align: middle !important;
        font-weight: 600 !important;
    }
    
    #save-search {
        vertical-align: middle !important;
        margin-right: 0 !important;
        margin-bottom: 0 !important;
        transform: scale(1.1) !important;
    }
    
    /* Second line: Buttons container */
    .buttons-container {
        display: flex !important;
        gap: 10px !important;
        width: 100% !important;
        justify-content: flex-start !important;
    }
    
    /* Button styling remains the same */
    .buttons-container .btn {
        flex: none !important;
        white-space: nowrap !important;
    }
    
    /* Mobile date input */
    input[type="date"] {
        min-height: 40px;
        padding: 8px 12px;
        font-size: 0.85rem;
    }
}

/* COMPACT MOBILE RESPONSIVENESS */
@media (max-width: 768px) {
    .pcc-form-container, .pcc-post-box, .pcc-manage-container {
        margin: 8px; /* Reduced from 10px */
        padding: 12px; /* Reduced from 16px */
    }
    
    .form-control, .form-select {
        min-height: 40px; /* Reduced from 52px */
        padding: 8px 12px; /* Reduced from 12px 16px */
        padding-right: 32px; /* Reduced from 40px */
        font-size: 0.85rem; /* Reduced from 0.9rem */
    }
    
    .character-section .col-md-2,
    .character-section .col-md-3 {
        margin-bottom: 8px; /* Reduced from 12px */
    }
    
    .character-section .remove-character {
        margin-top: 8px; /* Reduced from 12px */
        width: 100%;
    }
    
    .pcc-filter-container .col-md-3,
    .pcc-filter-container .col-md-4 {
        margin-bottom: 8px; /* Reduced from 12px */
    }
    
    .pcc-form-container h2,
    .pcc-manage-container h2 {
        font-size: 1.3rem; /* Reduced from 1.5rem */
    }
    
    .pcc-short-desc h3,
    .pcc-full-desc h3,
    .pcc-manage-container h3 {
        font-size: 1rem; /* Reduced from 1.2rem */
    }
    
    .pcc-casting-image {
        max-width: 140px !important; /* Reduced from 180px */
        max-height: 140px !important; /* Reduced from 180px */
        min-width: 120px !important; /* Reduced from 150px */
        min-height: 90px !important; /* Reduced from 120px */
    }
    
    .pcc-image-gallery {
        gap: 12px !important; /* Reduced from 15px */
        padding: 12px !important; /* Reduced from 15px */
    }
    
    .pcc-jobs-table .btn-group {
        min-width: 100px !important;
    }
    
    .pcc-jobs-table .btn-group .btn {
        font-size: 0.7rem !important;
        padding: 3px 6px !important;
    }
    
    .pcc-jobs-table td:last-child {
        min-width: 110px !important;
    }
    
    /* Enhanced image upload mobile styles */
    .pcc-image-gallery {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
    
    .pcc-upload-area {
        padding: 30px 15px !important;
    }
    
    .pcc-upload-area i {
        font-size: 2.5rem !important;
    }
    
    .pcc-image-container {
        height: 180px !important;
    }
    
    .pcc-remove-image,
    .pcc-remove-existing {
        opacity: 1 !important; /* Always visible on mobile */
    }
}

/* HIGH CONTRAST AND ACCESSIBILITY */
@media (prefers-contrast: high) {
    .pcc-form-container, .pcc-post-box, .pcc-manage-container {
        border: 3px solid #000000;
    }
    
    .form-control, .form-select {
        border: 3px solid #000000;
    }
    
    .pcc-custom-dropdown .pcc-dropdown-toggle {
        border: 3px solid #000000;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        transform: none !important;
        animation: none !important;
    }
}

/* COMPACT: Overall spacing improvements */
.pcc-post-box > * {
    margin-bottom: 6px !important; /* Reduced from 8px */
}

.pcc-post-box > *:last-child {
    margin-bottom: 0 !important;
}

/* Close description to details spacing */
.pcc-details + .pcc-short-desc {
    margin-top: 2px !important; /* Reduced from 4px */
}


.pcc-short-desc + .pcc-full-desc {
    margin-top: 4px !important;
}

/* Improved readability */
.text-muted {
    color: #6c757d !important;
    font-size: 0.75rem !important; /* Reduced from 0.8rem */
}

/* Compact form feedback */
.form-text {
    font-size: 0.7rem !important; /* Reduced from 0.75rem */
    margin-top: 3px !important; /* Reduced from 4px */
}

/* Fix word wrapping - Complete words only, no mid-word breaks */
.pcc-short-desc p,
.pcc-full-desc p,
.pcc-post-box p,
.pcc-title,
.pcc-title a,
.pcc-form-container h2,
.pcc-manage-container h2,
.pcc-manage-container h3 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    word-break: normal !important; /* CHANGED: Don't break words */
    hyphens: auto !important; /* Add hyphens for long words */
    max-width: 100% !important;
}

/* Specifically for links - allow breaking only at natural points */
.pcc-short-desc a,
.pcc-full-desc a,
.pcc-post-box a {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    word-break: break-all !important; /* Keep break-all for URLs only */
    max-width: 100% !important;
    display: inline-block !important;
}

/* Better text wrapping for titles and headings */
.pcc-title,
.pcc-title a,
.pcc-form-container h2,
.pcc-manage-container h2,
.pcc-manage-container h3 {
    word-break: keep-all !important; /* Keep words together */
    overflow-wrap: break-word !important;
    hyphens: auto !important;
}

/* Character details - better wrapping */
.pcc-character-list li {
    word-break: normal !important;
    hyphens: auto !important;
    line-height: 1.5 !important;
}

/* Accessibility focus states for custom dropdowns */
.pcc-dropdown-toggle:focus {
    outline: 2px solid #0056b3;
    outline-offset: 2px;
}

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

/* Ensure proper z-index layering */
.pcc-custom-dropdown {
    z-index: 100;
}

.pcc-custom-dropdown.open {
    z-index: 1001;
}

.pcc-dropdown-menu {
    z-index: 1002;
}

/* Mobile-specific image gallery improvements - stack vertically and increase size */
@media (max-width: 768px) {
    .pcc-image-gallery {
        display: flex !important;
        flex-direction: column !important; /* Stack vertically */
        gap: 20px !important; /* Increased gap for better spacing */
        margin-top: 20px !important;
        align-items: center !important; /* Center images */
    }
    
    .pcc-casting-image {
        max-width: 63% !important; /* Reduced by 30% from 90% */
        max-height: 280px !important; /* Reduced by 30% from 400px */
        min-width: 196px !important; /* Reduced by 30% from 280px */
        min-height: 140px !important; /* Reduced by 30% from 200px */
        width: auto !important;
        height: auto !important;
        object-fit: cover !important;
        border-radius: 12px !important;
        border: 3px solid #0056b3 !important;
    }
    
    .pcc-casting-image:hover {
        transform: scale(1.02) !important; /* Reduced hover effect for mobile */
        box-shadow: 0 8px 20px rgba(0, 86, 179, 0.25) !important;
    }
}

/* Enhanced Textarea Styling for Better Editing */
textarea.form-control {
    min-height: 120px !important; /* Base height for all textareas */
    resize: vertical !important; /* Allow vertical resize only */
    line-height: 1.6 !important;
    padding: 12px 16px !important;
    font-size: 14px !important;
}

/* Specific heights for different textarea types */
textarea#short_desc,
textarea#pcc_short_desc {
    min-height: 180px !important; /* Description fields - 20% taller (150px + 30px) */
}

textarea#full_desc,
textarea#pcc_full_desc {
    min-height: 240px !important; /* Complete details fields - 20% taller (200px + 40px) */
}