/*
 * Modern CSS styles for ShopClass Theme User Dashboard
 */

/* ── Layout Grid & Containers ────────────────────────────────────────────── */
.row {
    margin-top: 15px;
}

/* ── Modernized Account Sidebar & Menu ───────────────────────────────────── */
.profile-sidebar {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 12px !important;
    padding: 20px !important;
    margin-bottom: 30px !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05) !important;
}

.profile-userpic img {
    width: 90px !important;
    height: 90px !important;
    border-radius: 50% !important;
    margin: 0 auto 15px !important;
    object-fit: cover;
    border: 3px solid #f3f4f6;
}

.profile-usertitle {
    text-align: center;
    margin-bottom: 15px;
}

.profile-usertitle-name {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
}

.profile-usertitle-job {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    margin-top: 4px;
}

.profile-userbuttons {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
    border-bottom: 1px solid #f3f4f6;
    padding-bottom: 15px;
}

.profile-userbuttons a.btn {
    border-radius: 6px !important;
    padding: 6px 14px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Sidebar Menu List */
.profile-usermenu ul.nav {
    list-style: none;
    padding: 0 !important;
    margin: 0 !important;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.profile-usermenu ul.nav li {
    margin: 0 !important;
}

.profile-usermenu ul.nav li a {
    display: flex !important;
    align-items: center;
    padding: 10px 14px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #4b5563 !important;
    text-decoration: none !important;
    border-radius: 8px !important;
    background: transparent !important;
    transition: all 0.2s ease;
}

.profile-usermenu ul.nav li a i {
    width: 20px;
    margin-right: 10px;
    font-size: 16px;
    color: #9ca3af;
    text-align: center;
}

.profile-usermenu ul.nav li a:hover {
    background-color: #f3f4f6 !important;
    color: #111827 !important;
}

.profile-usermenu ul.nav li a:hover i {
    color: #4b5563;
}

/* Active Sidebar Link */
.profile-usermenu ul.nav li.active a {
    background: #e6f4ea !important;
    color: #137333 !important;
}

.profile-usermenu ul.nav li.active a i {
    color: #137333;
}

/* Mobile Responsive Sidebar Tabs (<768px) */
@media (max-width: 767px) {
    .profile-sidebar {
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        margin-bottom: 15px !important;
    }
    
    .profile-sidebar .row {
        display: flex;
        flex-direction: column;
    }
    
    /* Compact user card layout on mobile */
    .profile-sidebar .row > div:first-child {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        padding: 12px 16px !important;
        background: #ffffff !important;
        border: 1px solid #e5e7eb !important;
        border-radius: 12px !important;
        margin-bottom: 15px !important;
        gap: 12px !important;
        box-shadow: 0 1px 3px rgba(0,0,0,0.05) !important;
    }
    
    .profile-userpic {
        display: block !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .profile-userpic img {
        width: 44px !important;
        height: 44px !important;
        border: 2px solid #10b981 !important;
        margin: 0 !important;
    }
    
    .profile-usertitle {
        display: block !important;
        text-align: left !important;
        margin: 0 !important;
    }
    
    .profile-usertitle-name {
        font-size: 14px !important;
        font-weight: 700 !important;
        color: #111827 !important;
    }
    
    .profile-usertitle-job {
        font-size: 11px !important;
        color: #6b7280 !important;
        margin: 0 !important;
    }
    
    .profile-userbuttons {
        display: none !important;
    }
    
    .profile-usermenu ul.nav {
        flex-direction: row !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        gap: 6px !important;
        padding: 4px 0 12px 0 !important;
        margin: 0 !important;
        scrollbar-width: none;
    }
    
    .profile-usermenu ul.nav::-webkit-scrollbar {
        display: none;
    }
    
    .profile-usermenu ul.nav li a {
        display: inline-flex !important;
        white-space: nowrap !important;
        background: #ffffff !important;
        border: 1px solid #d1d5db !important;
        border-radius: 30px !important;
        padding: 6px 14px !important;
        font-size: 12px !important;
        font-weight: 600 !important;
        color: #374151 !important;
        box-shadow: 0 1px 2px rgba(0,0,0,0.05) !important;
    }
    
    .profile-usermenu ul.nav li a i {
        margin-right: 6px !important;
        font-size: 14px !important;
    }
    
    .profile-usermenu ul.nav li a:hover {
        background-color: #f3f4f6 !important;
    }
    
    .profile-usermenu ul.nav li.active a {
        background: #137333 !important;
        color: #ffffff !important;
        border-color: #137333 !important;
    }
    
    .profile-usermenu ul.nav li.active a i {
        color: #ffffff !important;
    }
}

/* ── Modernized Form Content Cards ───────────────────────────────────────── */
.tfc-item {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 12px !important;
    padding: 24px !important;
    margin-bottom: 30px !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05) !important;
}

@media (max-width: 480px) {
    .tfc-item {
        padding: 16px !important;
    }
}

.panel-heading {
    border-bottom: 1px solid #f3f4f6 !important;
    padding-bottom: 12px !important;
    margin-bottom: 24px !important;
    background: transparent !important;
}

.panel-title {
    font-size: 20px !important;
    font-weight: 700 !important;
    color: #111827 !important;
}

legend {
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #374151 !important;
    border-bottom: none !important;
    margin-bottom: 20px !important;
    text-align: left;
}

.form-group {
    margin-bottom: 20px !important;
}

.form-group label.control-label {
    text-align: left !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #374151 !important;
    padding-top: 8px !important;
}

/* Force stacked forms and full-width inputs on mobile viewports */
@media (max-width: 767px) {
    .tfc-form .form-group {
        display: flex !important;
        flex-direction: column !important;
        margin-bottom: 15px !important;
        padding: 0 !important;
    }
    
    .tfc-form .form-group label.control-label {
        width: 100% !important;
        text-align: left !important;
        padding-left: 0 !important;
        padding-bottom: 4px !important;
        font-size: 13px !important;
    }
    
    /* Clean up Bootstrap display: table settings on input-groups */
    .tfc-form .form-group .input-group,
    .tfc-form .form-group div[class*="col-"] {
        width: 100% !important;
        padding: 0 !important;
        display: block !important;
        border-collapse: separate !important;
    }
    
    .tfc-form .form-group input[type="text"],
    .tfc-form .form-group input[type="password"],
    .tfc-form .form-group input[type="email"],
    .tfc-form .form-group select,
    .tfc-form .form-group textarea {
        display: block !important;
        width: 100% !important;
        height: 42px !important;
        padding: 10px 12px !important;
        font-size: 14px !important;
        border: 1px solid #d1d5db !important;
        border-radius: 8px !important;
        box-sizing: border-box !important;
        background-color: #ffffff !important;
    }
    
    .tfc-form .form-group textarea {
        height: auto !important;
        min-height: 100px !important;
    }
    
    /* Button sizes adjusted for easy touch targets */
    .tfc-form .form-group .btn,
    .tfc-item button.btn,
    .modify_profile button.btn {
        width: 100% !important;
        height: 46px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 15px !important;
        font-weight: 700 !important;
        margin-top: 10px !important;
    }
}

/* Modern inputs and select dropdowns (Desktop defaults) */
.form-group .input-group input[type="text"],
.form-group .input-group input[type="password"],
.form-group .input-group input[type="email"],
.form-group .input-group select,
.form-group .input-group textarea,
.tfc-form input[type="text"],
.tfc-form input[type="password"],
.tfc-form select,
.tfc-form textarea {
    width: 100% !important;
    padding: 10px 14px !important;
    font-size: 14px !important;
    border: 1px solid #d1d5db !important;
    border-radius: 8px !important;
    background-color: #ffffff !important;
    outline: none !important;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.02) !important;
    box-sizing: border-box !important;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out !important;
}

.form-group .input-group input:focus,
.form-group .input-group select:focus,
.form-group .input-group textarea:focus,
.tfc-form input:focus,
.tfc-form select:focus,
.tfc-form textarea:focus {
    border-color: #10b981 !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15) !important;
}

/* Align select element heights */
.form-group .input-group select {
    height: 40px !important;
}

.form-group .input-group textarea {
    min-height: 100px !important;
    resize: vertical !important;
}

/* Form layout spacing for labels on mobile */
@media (max-width: 991px) {
    .form-group label.control-label {
        margin-bottom: 6px !important;
        display: block !important;
        width: 100% !important;
    }
    .form-group .input-group {
        width: 100% !important;
    }
}

/* ── Modern Buttons ──────────────────────────────────────────────────────── */
.btn-success,
.btn-danger {
    font-weight: 700 !important;
    padding: 10px 24px !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px;
    height: auto !important;
    border: none !important;
}

.btn-success {
    background: #10b981 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.2) !important;
}

.btn-success:hover {
    background: #059669 !important;
    box-shadow: 0 4px 14px rgba(5, 150, 105, 0.3) !important;
}

.btn-danger {
    background: #ef4444 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.2) !important;
}

.btn-danger:hover {
    background: #dc2626 !important;
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.3) !important;
}

/* ── Authentication Screens (Login, Register, Recover) ──────────────────── */
.login .row, 
.register .row, 
.recover .row, 
.forgot .row {
    display: flex;
    justify-content: center;
}

.login .col-md-8,
.register .col-md-8,
.recover .col-md-8 {
    max-width: 460px;
    width: 100%;
}

/* ── Dashboard Stats Optimizations for Mobile ────────────────────────────── */
@media (max-width: 767px) {
    .user-stats {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
        padding: 15px !important;
        background: #f8fafc !important;
        border-radius: 12px !important;
        border: 1px solid #e2e8f0 !important;
    }
    
    .user-stats p.lead {
        margin-bottom: 8px !important;
        font-weight: 700 !important;
        font-size: 15px !important;
        color: #4b5563 !important;
    }
    
    .user-stats .col-sm-4 {
        width: 100% !important;
        padding: 12px 16px !important;
        background: #ffffff !important;
        border: 1px solid #e2e8f0 !important;
        border-radius: 10px !important;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02) !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: flex-start !important;
        text-align: left !important;
        gap: 15px !important;
        margin-bottom: 0 !important;
    }
    
    .user-stats .col-sm-4 p {
        margin: 0 !important;
    }
    
    .user-stats .col-sm-4 p i {
        font-size: 24px !important;
        color: #137333 !important;
        width: 30px;
        text-align: center;
    }
    
    .user-stats .col-sm-4 p.fa-2x {
        font-size: 18px !important;
        font-weight: 700 !important;
        color: #111827 !important;
        order: 3 !important;
        margin-left: auto !important;
    }
    
    .user-stats .col-sm-4 p:nth-child(3) {
        font-size: 13px !important;
        font-weight: 600 !important;
        color: #4b5563 !important;
        order: 2 !important;
    }
    
    /* Social Connection container spacing */
    .user-social-connection {
        padding: 15px !important;
    }
    
    .user-social-connection p.lead {
        font-weight: 700 !important;
        font-size: 15px !important;
        margin-bottom: 12px !important;
    }
    
    .user-social-connection .btn {
        width: 100% !important;
        margin-bottom: 8px !important;
        justify-content: center !important;
    }
}

/* Hide mobile bottom nav on desktop */
.mobile-bottom-nav,
.mobile-drawer-backdrop,
.mobile-drawer {
    display: none;
}

@media (max-width: 767px) {
    /* Hide the desktop sidebar card entirely on mobile */
    .profile-sidebar {
        display: none !important;
    }
    
    /* Ensure content has padding at bottom so it's not hidden behind bottom nav */
    .col-md-8, 
    .col-sm-8,
    .content.user_account {
        padding-bottom: 80px !important;
    }
    
    /* Mobile Bottom Navigation Bar styles */
    .mobile-bottom-nav {
        display: flex !important;
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        height: 60px !important;
        background: #ffffff !important;
        border-top: 1px solid #e2e8f0 !important;
        z-index: 9999 !important;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.06) !important;
        justify-content: space-around !important;
        align-items: center !important;
    }
    
    .mobile-nav-item {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-decoration: none !important;
        color: #64748b !important;
        font-size: 10px !important;
        font-weight: 700 !important;
        flex: 1 !important;
        height: 100% !important;
        transition: all 0.2s ease !important;
    }
    
    .mobile-nav-item i {
        font-size: 20px !important;
        margin-bottom: 3px !important;
    }
    
    .mobile-nav-item.active {
        color: #10b981 !important;
    }
    
    .mobile-nav-item.active i {
        color: #10b981 !important;
    }
    
    /* Mobile Bottom Sheet Drawer Backdrop */
    .mobile-drawer-backdrop {
        display: block !important;
        position: fixed !important;
        top: 0 !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        background: rgba(0, 0, 0, 0.4) !important;
        z-index: 10000 !important;
        opacity: 0 !important;
        visibility: hidden !important;
        transition: opacity 0.25s ease, visibility 0.25s ease !important;
    }
    
    .mobile-drawer-backdrop.open {
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    /* Mobile Bottom Sheet Drawer Container */
    .mobile-drawer {
        display: block !important;
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        background: #ffffff !important;
        border-radius: 20px 20px 0 0 !important;
        z-index: 10001 !important;
        box-shadow: 0 -10px 25px rgba(0,0,0,0.15) !important;
        transform: translateY(100%) !important;
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
        max-height: 80% !important;
        overflow-y: auto !important;
    }
    
    .mobile-drawer.open {
        transform: translateY(0) !important;
    }
    
    /* Header inside Bottom Sheet */
    .mobile-drawer-header {
        padding: 14px 20px 10px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        border-bottom: 1px solid #f1f5f9 !important;
        position: relative !important;
    }
    
    .mobile-drawer-indicator {
        position: absolute !important;
        top: 6px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        width: 36px !important;
        height: 4px !important;
        background: #cbd5e1 !important;
        border-radius: 2px !important;
    }
    
    .mobile-drawer-title {
        font-size: 15px !important;
        font-weight: 700 !important;
        color: #1e293b !important;
    }
    
    .mobile-drawer-close {
        border: none !important;
        background: transparent !important;
        font-size: 24px !important;
        font-weight: 300 !important;
        color: #64748b !important;
        padding: 0 !important;
        line-height: 1 !important;
        cursor: pointer !important;
    }
    
    /* Drawer Links List */
    .mobile-drawer-content {
        padding: 10px 20px 30px !important;
    }
    
    .mobile-drawer-list {
        list-style: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .mobile-drawer-list li {
        margin: 0 !important;
    }
    
    .mobile-drawer-list li a {
        display: flex !important;
        align-items: center !important;
        padding: 14px 0 !important;
        font-size: 15px !important;
        font-weight: 600 !important;
        color: #334155 !important;
        text-decoration: none !important;
        border-bottom: 1px solid #f1f5f9 !important;
    }
    
    .mobile-drawer-list li a i {
        font-size: 18px !important;
        margin-right: 12px !important;
        color: #64748b !important;
        width: 22px !important;
        text-align: center !important;
    }
    
    .mobile-drawer-list li.divider {
        height: 1px !important;
        background: #e2e8f0 !important;
        margin: 15px 0 !important;
    }
    
    .mobile-drawer-list li a.logout-link {
        color: #ef4444 !important;
    }
    
    .mobile-drawer-list li a.logout-link i {
        color: #ef4444 !important;
    }
}
