/* ================= HEADER CUSTOM CSS ================= */

.header-actions-wrapper {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
}

.header-actions-wrapper .userProfile_crd {
    padding-right: 0 !important;
    margin: 0 !important;
    text-align: right;
}

.header-actions-wrapper .userProfile_crd li.dropdown {
    margin-left: 0 !important;
    position: relative;
}

/* ================= WHITE THEME PROFILE CARD ================= */
.header-profile-card {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #FFFFFF !important;
    border: 1.5px solid #E2E8F0 !important;
    padding: 4px 12px 4px 5px;
    border-radius: 50px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    text-decoration: none !important;
    user-select: none;
}

.header-profile-card:hover {
    background: #F8FAFC !important;
    border-color: #CBD5E1 !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
    transform: translateY(-1px);
}

.user-avatar-wrap {
    position: relative;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-avatar-img {
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    display: block !important;
}

.user-avatar-img.driver-border {
    border: 2px solid #16A34A !important;
    box-shadow: 0 0 6px rgba(22, 163, 74, 0.3);
}

.user-avatar-img.customer-border {
    border: 2px solid #0EA5E9 !important;
    box-shadow: 0 0 6px rgba(14, 165, 233, 0.3);
}

/* Dummy Vector Icon Avatar */
.user-avatar-dummy {
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.user-avatar-dummy.customer-dummy {
    background: #EFF6FF !important;
    border: 1.5px solid #BFDBFE !important;
}

.user-avatar-dummy.customer-dummy iconify-icon {
    font-size: 20px !important;
    color: #2563EB !important;
}

.user-avatar-dummy.driver-dummy {
    background: #F0FDF4 !important;
    border: 1.5px solid #BBF7D0 !important;
}

.user-avatar-dummy.driver-dummy iconify-icon {
    font-size: 20px !important;
    color: #16A34A !important;
}

.user-online-status {
    position: absolute;
    bottom: 0px;
    right: 0px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    border: 1.5px solid #FFFFFF;
}

.user-online-status.driver {
    background-color: #16A34A;
    box-shadow: 0 0 4px #16A34A;
}

.user-online-status.customer {
    background-color: #10B981;
    box-shadow: 0 0 4px #10B981;
}

.user-info-text {
    line-height: 1.25;
    text-align: left;
}

.user-name-title {
    font-size: 13px !important;
    font-weight: 700 !important;
    color: #0F172A !important;
    letter-spacing: 0.01em;
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
    margin-bottom: 1px;
}

.user-role-badge {
    font-size: 9.5px !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    display: block;
}

.user-role-badge.driver {
    color: #16A34A !important;
}

.user-role-badge.customer {
    color: #0284C7 !important;
}

.user-dropdown-arrow-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #F1F5F9;
    transition: all 0.2s ease;
    margin-left: 2px;
}

.header-profile-card:hover .user-dropdown-arrow-wrap {
    background: #E2E8F0;
}

.user-dropdown-arrow {
    font-size: 11px;
    color: #475569;
    transition: transform 0.2s ease, color 0.2s ease;
}

.header-profile-card:hover .user-dropdown-arrow {
    color: #0F172A;
    transform: translateY(1px);
}

/* ================= WHITE DROPDOWN MENU ================= */
.userProfile_crd .profileDropdows_menu {
    background: #FFFFFF !important;
    border: 1px solid #E2E8F0 !important;
    border-radius: 16px !important;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.14) !important;
    padding: 10px !important;
    min-width: 250px !important;
    right: 0 !important;
    left: auto !important;
    top: calc(100% + 8px) !important;
}

.userProfile_crd .profileDropdows_menu .user-header-info-box {
    background: #F8FAFC !important;
    border: 1px solid #F1F5F9 !important;
    border-radius: 12px !important;
    padding: 10px 12px !important;
    margin-bottom: 8px !important;
}

.userProfile_crd .profileDropdows_menu .user-header-info-box .user-avatar-wrap,
.userProfile_crd .profileDropdows_menu .user-header-info-box .user-avatar-img,
.userProfile_crd .profileDropdows_menu .user-header-info-box .user-avatar-dummy {
    width: 38px !important;
    height: 38px !important;
}

.userProfile_crd .profileDropdows_menu .dropdown-user-name {
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #0F172A !important;
    margin-bottom: 2px !important;
    line-height: 1.3 !important;
}

.userProfile_crd .profileDropdows_menu .dropdown-user-email {
    font-size: 11.5px !important;
    font-weight: 500 !important;
    color: #64748B !important;
    margin-bottom: 0 !important;
    line-height: 1.3 !important;
    word-break: break-all !important;
}

.userProfile_crd .profileDropdows_menu .dropdown-user-driver-id {
    font-size: 11.5px !important;
    font-weight: 600 !important;
    color: #16A34A !important;
    margin-bottom: 0 !important;
    line-height: 1.3 !important;
}

.userProfile_crd .profileDropdows_menu a.dropdown-item,
.userProfile_crd .profileDropdows_menu li a,
.userProfile_crd .profileDropdows_menu .dropdown-item {
    color: #1E293B !important;
    border-radius: 10px !important;
    padding: 8px 12px !important;
    font-size: 13.5px !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
    display: flex !important;
    align-items: center !important;
    background: transparent;
    text-decoration: none !important;
}

.userProfile_crd .profileDropdows_menu .dropdown-item:hover,
.userProfile_crd .profileDropdows_menu li a:hover {
    background: #F1F5F9 !important;
    color: #0F172A !important;
    transform: translateX(3px) !important;
}

.userProfile_crd .profileDropdows_menu .dropdown-item iconify-icon,
.userProfile_crd .profileDropdows_menu li a iconify-icon {
    font-size: 18px !important;
    margin-right: 10px !important;
    color: #64748B !important;
    transition: color 0.2s ease !important;
}

.userProfile_crd .profileDropdows_menu .dropdown-item:hover iconify-icon,
.userProfile_crd .profileDropdows_menu li a:hover iconify-icon {
    color: #0F172A !important;
}

.userProfile_crd .profileDropdows_menu .dropdown-divider {
    border-top: 1px solid #F1F5F9 !important;
    margin: 6px 0 !important;
}

.userProfile_crd .profileDropdows_menu .dropdown-item.text-danger {
    color: #EF4444 !important;
}

.userProfile_crd .profileDropdows_menu .dropdown-item.text-danger iconify-icon {
    color: #EF4444 !important;
}

.userProfile_crd .profileDropdows_menu .dropdown-item.text-danger:hover {
    background: #FEF2F2 !important;
    color: #DC2626 !important;
}

.userProfile_crd .profileDropdows_menu .dropdown-item.text-danger:hover iconify-icon {
    color: #DC2626 !important;
}

/* Override conflicts from older .userProfile_crd rules */
.userProfile_crd .header-profile-card .avatar,
.userProfile_crd .header-profile-card .avatar-md {
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    background: transparent !important;
}

/* ================= GUEST BUTTONS ================= */
.btn-driver-portal-header {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background-color: #AEFC33;
    color: #0A0A0A !important;
    border: 1px solid #AEFC33;
    padding: 7px 18px;
    border-radius: 40px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-decoration: none !important;
    transition: all 0.3s ease;
    box-shadow: 0 3px 12px rgba(174, 252, 51, 0.25);
    white-space: nowrap;
    cursor: pointer;
    line-height: normal;
}

.btn-driver-portal-header:hover {
    background-color: #9de327;
    color: #000000 !important;
    border-color: #9de327;
    box-shadow: 0 5px 18px rgba(174, 252, 51, 0.45);
    transform: translateY(-1px);
}

.btn-driver-portal-header iconify-icon {
    font-size: 17px;
    color: #0A0A0A;
}

.btn-customer-login-header {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(255, 255, 255, 0.12);
    color: #FFFFFF !important;
    border: 1.5px solid rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 7px 18px;
    border-radius: 40px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-decoration: none !important;
    transition: all 0.3s ease;
    white-space: nowrap;
    cursor: pointer;
    line-height: normal;
}

.btn-customer-login-header:hover {
    background: #FFFFFF;
    color: #0A0A0A !important;
    border-color: #FFFFFF;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

.btn-customer-login-header iconify-icon {
    font-size: 17px;
    color: currentColor;
}

.header-sticky .btn-customer-login-header {
    background: rgba(10, 10, 10, 0.05);
    color: #0A0A0A !important;
    border: 1.5px solid rgba(10, 10, 10, 0.25);
}

.header-sticky .btn-customer-login-header:hover {
    background: #0A0A0A;
    color: #FFFFFF !important;
    border-color: #0A0A0A;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

@media (max-width: 767px) {
    .header-actions-wrapper {
        gap: 8px;
    }
    .user-name-title {
        max-width: 80px;
        font-size: 11.5px !important;
    }
    .user-role-badge {
        font-size: 8.5px !important;
    }
    .header-profile-card {
        padding: 3px 8px 3px 4px;
        gap: 6px;
    }
    .user-avatar-wrap,
    .user-avatar-img,
    .user-avatar-dummy {
        width: 30px !important;
        height: 30px !important;
    }
    .user-avatar-dummy iconify-icon {
        font-size: 16px !important;
    }
    .btn-driver-portal-header,
    .btn-customer-login-header {
        padding: 6px 12px;
        font-size: 11px;
        gap: 5px;
    }
    .btn-driver-portal-header iconify-icon,
    .btn-customer-login-header iconify-icon {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .header-actions-wrapper {
        gap: 6px;
    }
    .user-name-title {
        max-width: 65px;
        font-size: 10.5px !important;
    }
    .btn-driver-portal-header,
    .btn-customer-login-header {
        padding: 5px 9px;
        font-size: 10.5px;
        gap: 4px;
    }
}
