/* ========================================
   GLOBAL FIXES - ALL PAGES
   ======================================== */

/* Hide Extra Elements */
.dashboard__icon {
    display: none !important;
}

.dashboard__icon__bars {
    display: none !important;
}

.sidebar-icon {
    display: none !important;
}

/* Fix Dashboard Layout */
.dashboard-area {
    padding: 0 !important;
}

.dashboard__contents__wrapper {
    display: block !important;
}

.dashboard__left {
    display: none !important;
}

.dashboard__right {
    margin-left: 0 !important;
    width: 100% !important;
}

/* Fix Profile Settings Area */
.profile-settings-area {
    padding-top: 40px !important;
    padding-bottom: 40px !important;
}

.profile-settings-area .row {
    display: flex !important;
    flex-wrap: wrap !important;
}

/* Desktop Sidebar - Show */
@media (min-width: 992px) {
    .profile-settings-area .col-xl-3.col-lg-4 {
        display: block !important;
        position: relative !important;
        top: auto !important;
        left: auto !important;
        width: auto !important;
        max-width: 100% !important;
        height: auto !important;
        z-index: auto !important;
        transition: none !important;
        background: transparent !important;
        overflow-y: visible !important;
        box-shadow: none !important;
    }

    .profile-settings-area .col-xl-3.col-lg-4.active {
        left: auto !important;
    }

    .profile-bars {
        display: none !important;
    }

    .profile-close {
        display: none !important;
    }

    .responsive-overlay {
        display: none !important;
    }

    .profile-settings-menu {
        position: relative !important;
        width: 100% !important;
        height: auto !important;
        padding: 0 !important;
        background: #FFFFFF !important;
        border-radius: 12px !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
        border: 1px solid #E4E5E7 !important;
    }

    .profile-settings-menu::before {
        display: none !important;
    }

    .profile-settings-menu-inner {
        padding: 0 !important;
    }

    .sticky_top_lg {
        position: sticky !important;
        top: 20px !important;
    }
}

/* Mobile Sidebar - Hide by Default */
@media (max-width: 991px) {
    .profile-settings-area .col-xl-3.col-lg-4 {
        position: fixed !important;
        top: 0 !important;
        left: -320px !important;
        width: 300px !important;
        max-width: 85vw !important;
        height: 100vh !important;
        z-index: 10010 !important;
        transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
        background: linear-gradient(180deg, #ffffff 0%, #f9fafb 100%) !important;
        overflow-y: auto !important;
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12) !important;
    }

    .profile-settings-area .col-xl-3.col-lg-4.active {
        left: 0 !important;
    }

    .profile-bars {
        position: fixed !important;
        bottom: 20px !important;
        right: 20px !important;
        z-index: 10002 !important;
        width: 56px !important;
        height: 56px !important;
        background: linear-gradient(135deg, #1DBF73 0%, #19A463 100%) !important;
        border-radius: 50% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        box-shadow: 0 8px 24px rgba(29, 191, 115, 0.4), 0 4px 8px rgba(0, 0, 0, 0.1) !important;
        cursor: pointer !important;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        border: none !important;
    }

    .profile-bars:hover {
        transform: scale(1.1) rotate(90deg) !important;
        box-shadow: 0 12px 32px rgba(29, 191, 115, 0.5), 0 6px 12px rgba(0, 0, 0, 0.15) !important;
    }

    .profile-bars i {
        color: #ffffff !important;
        font-size: 24px !important;
    }

    .responsive-overlay {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        background: rgba(0, 0, 0, 0.65) !important;
        backdrop-filter: blur(2px) !important;
        z-index: 10009 !important;
        opacity: 0 !important;
        visibility: hidden !important;
        transition: all 0.3s ease !important;
    }

    .responsive-overlay.active {
        opacity: 1 !important;
        visibility: visible !important;
    }
}

/* Fix Content Area */
.profile-settings-area .col-xl-9.col-lg-8 {
    flex: 0 0 100% !important;
    max-width: 100% !important;
}

@media (min-width: 992px) {
    .profile-settings-area .col-xl-9.col-lg-8 {
        flex: 0 0 calc(100% - 320px) !important;
        max-width: calc(100% - 320px) !important;
    }
}

/* Fix Page Layout */
.page-wrapper {
    width: 100% !important;
}

.container-fluid {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Ensure CSS loads properly */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
}

/* Fix any layout quirks */
* {
    box-sizing: border-box !important;
}

html {
    scroll-behavior: smooth !important;
}

/* ========================================
   PREMIUM INPUT & SELECT STYLING
   ======================================== */

/* Fix Select Appearance */
select.form-control,
select.form--control {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23666' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 15px center !important;
    padding-right: 40px !important;
    cursor: pointer !important;
    height: 50px !important;
    border: 1px solid #E4E5E7 !important;
    border-radius: 8px !important;
    font-size: 15px !important;
    background-color: #FFFFFF !important;
    transition: all 0.3s ease !important;
}

select.form-control:focus,
select.form--control:focus {
    border-color: #1DBF73 !important;
    box-shadow: 0 0 0 3px rgba(29, 191, 115, 0.1) !important;
    outline: none !important;
}

/* Fix Flex Input Alignment */
.single-flex-input {
    display: flex !important;
    gap: 20px !important;
    align-items: flex-end !important;
    margin-bottom: 20px !important;
    width: 100% !important;
}

.single-flex-input>div,
.single-flex-input>.single-input {
    flex: 1 !important;
    margin-bottom: 0 !important;
}

/* Date Input Specific Fix */
input[type="date"].form-control {
    height: 50px !important;
}

/* Premium File Upload Styling */
input[type="file"] {
    background: #F8F9FA !important;
    border: 2px dashed #E4E5E7 !important;
    border-radius: 12px !important;
    padding: 20px !important;
    width: 100% !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    color: #62646A !important;
    font-size: 14px !important;
}

input[type="file"]::file-selector-button {
    background: linear-gradient(135deg, #1DBF73 0%, #19A463 100%) !important;
    border: none !important;
    color: #FFFFFF !important;
    padding: 8px 20px !important;
    border-radius: 30px !important;
    cursor: pointer !important;
    margin-right: 15px !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    box-shadow: 0 4px 10px rgba(29, 191, 115, 0.2) !important;
    transition: all 0.3s ease !important;
}

input[type="file"]::file-selector-button:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 15px rgba(29, 191, 115, 0.3) !important;
}

input[type="file"]:hover {
    border-color: #1DBF73 !important;
    background: #F0FBF5 !important;
}

/* Sidebar Specific Select Fix */
.single-shop-left-select select.form-control {
    height: 48px !important;
    padding: 0 15px !important;
    font-size: 14px !important;
    border: 2px solid #E4E5E7 !important;
    border-radius: 10px !important;
}

/* Fix for Experience Level Dropdown wrapping in sidebar */
.single-shop-left-select .single-flex-input {
    display: block !important;
    margin-bottom: 0 !important;
}

.single-shop-left-select .single-flex-input .single-input label {
    display: none !important;
    /* Hide redundant label in component */
}

/* Modal Specific Adjustments */
.profile-popup .popup-contents {
    max-width: 650px !important;
    border-radius: 16px !important;
    padding: 30px !important;
}

.popup-contents-title {
    margin-bottom: 25px !important;
    font-weight: 700 !important;
}

.popup-contents-form.custom-form {
    padding-top: 20px !important;
}

/* ========================================
   UNIFIED PREMIUM STEPPER
   ======================================== */

.gig-stepper-container {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    border: 1px solid #ebebeb;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
    margin-bottom: 30px;
}

.unified-stepper {
    display: flex;
    justify-content: space-between;
    position: relative;
    padding: 0;
    margin: 0;
    list-style: none;
}

.unified-stepper::before {
    content: '';
    position: absolute;
    top: 18px;
    left: 40px;
    right: 40px;
    height: 2px;
    background: #f1f1f1;
    z-index: 1;
}

.unified-stepper-item {
    position: relative;
    z-index: 2;
    flex: 1;
    text-align: center;
    cursor: pointer;
}

.stepper-icon {
    width: 38px;
    height: 38px;
    background: #fff;
    border: 2px solid #f1f1f1;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    color: #999;
    font-size: 14px;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stepper-label {
    font-size: 13px;
    font-weight: 600;
    color: #7a7d85;
    transition: all 0.3s ease;
    display: block;
}

/* Active State */
.unified-stepper-item.active .stepper-icon {
    background: #1dbf73;
    border-color: #1dbf73;
    color: #fff;
    box-shadow: 0 0 0 4px rgba(29, 191, 115, 0.15);
}

.unified-stepper-item.active .stepper-label {
    color: #1dbf73;
    font-weight: 700;
}

/* Completed State */
.unified-stepper-item.completed .stepper-icon {
    background: #fff;
    border-color: #1dbf73;
    color: #1dbf73;
}

.unified-stepper-item.completed .stepper-label {
    color: #333;
}

.unified-stepper-item.completed .stepper-icon::after {
    content: '\f00c';
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
}

.unified-stepper-item.completed .stepper-icon span {
    display: none;
}

/* Hover effect */
.unified-stepper-item:hover .stepper-icon {
    border-color: #1dbf73;
}

/* ========================================
   GLOBAL TEXT OVERFLOW & SELECT2 FIXES
   ======================================== */

/* Fix Select2 Multiple (Subcategory, Tags, Countries) */
.select2-container--default .select2-selection--multiple {
    min-height: 50px !important;
    border: 1px solid #E4E5E7 !important;
    border-radius: 8px !important;
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    padding: 2px 10px !important;
    background-color: #ffffff !important;
    transition: all 0.3s ease !important;
}

.select2-container--default.select2-container--focus .select2-selection--multiple {
    border-color: #1DBF73 !important;
    box-shadow: 0 0 0 3px rgba(29, 191, 115, 0.1) !important;
}

/* Fix Placeholder Alignment in Select2 Multiple */
.select2-container--default .select2-selection--multiple .select2-search__field {
    margin-top: 0 !important;
    line-height: 44px !important;
    height: 44px !important;
    width: 100% !important;
    padding-left: 5px !important;
}

/* Fix Selected Items (Pills) */
.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: #F0FDF4 !important;
    border: 1px solid rgba(29, 191, 115, 0.2) !important;
    color: #1DBF73 !important;
    border-radius: 6px !important;
    padding: 6px 12px 6px 32px !important; /* Increased left padding to prevent overlap */
    font-size: 13px !important;
    font-weight: 600 !important;
    margin: 4px 6px 4px 0 !important;
    position: relative !important;
    display: flex !important;
    align-items: center !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: #1DBF73 !important;
    border: none !important;
    font-weight: 900 !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    left: 8px !important; /* Fixed left position */
    margin: 0 !important;
    position: absolute !important;
    background: transparent !important;
    font-family: "Font Awesome 6 Free" !important;
    font-size: 12px !important; /* Slightly smaller for better fit */
    line-height: 1 !important;
    height: auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 5 !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
    color: #ff4d4d !important;
    background: transparent !important;
}

/* Force Font Awesome "x" if the default is missing */
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove::before {
    content: "\f00d" !important;
}

/* Global Text Overflow Protection */
.badge,
.tag,
.label-title,
.premium-header-info h3,
.stepper-label,
.project-title {
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

/* Form Control Wrappers */
.single-input {
    width: 100% !important;
    max-width: 100% !important;
}

/* Fix for Multi-select container overflow in small columns */
.select2-container {
    width: 100% !important;
    max-width: 100% !important;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .gig-stepper-container {
        padding: 15px 10px !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .unified-stepper {
        min-width: 600px !important;
    }

    .stepper-label {
        font-size: 11px !important;
    }
}