/* Account Page Styles */
.account-section {
    background-color: #f9f9f9;
    min-height: 80vh;
    padding: 60px 0;
}

/* Force image visibility on all devices */
img {
    max-width: 100%;
    height: auto;
    display: block !important;
}

/* Ensure all images in account section are visible */
.account-section img,
.account-avatar img,
.account-user img {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Account Sidebar */
.account-sidebar {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    padding: 30px;
    position: sticky;
    top: 20px;
}

.account-user {
    display: flex;
    align-items: center;
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.account-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 15px;
    border: 2px solid #f0f0f0;
    flex-shrink: 0;
}

.account-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block;
}

.account-avatar:hover img {
    transform: scale(1.1);
}

.account-info h4 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.account-info p {
    color: #666;
    margin: 0;
    font-size: 0.9rem;
}

.account-menu {
    display: flex;
    flex-direction: column;
}

.account-menu-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: #333;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s;
    margin-bottom: 5px;
}

.account-menu-item i {
    margin-right: 10px;
    font-size: 1.2rem;
}

.account-menu-item:hover {
    background-color: #f5f5f5;
    color: #3b82f6;
    transform: translateX(5px);
}

.account-menu-item.active {
    background-image: linear-gradient(to right, #3b82f6, #0d9488);
    color: white;
}

.account-menu-item.logout {
    margin-top: 20px;
    color: #ef4444;
}

.account-menu-item.logout:hover {
    background-color: #fef2f2;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #333;
    cursor: pointer;
    padding: 10px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
    background-color: #f5f5f5;
    color: #3b82f6;
}

.mobile-menu-toggle i {
    display: block;
}

/* Account Content */
.account-content {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    padding: 30px;
}

/* Mobile Account Header */
.mobile-account-header {
    display: none;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.mobile-user-info {
    display: flex;
    align-items: center;
}

.mobile-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 12px;
    border: 2px solid #f0f0f0;
}

.mobile-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mobile-user-details h5 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 2px 0;
    color: #1f2937;
}

.mobile-user-details p {
    font-size: 0.8rem;
    color: #666;
    margin: 0;
}

.account-header {
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 15px;
}

.account-header:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background-image: linear-gradient(to right, #3b82f6, #0d9488);
}

.account-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.account-header p {
    color: #666;
    margin: 0;
}

/* Account Section Cards */
.account-section-card {
    background-color: #f9f9f9;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 25px;
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
}

.account-section-card:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transform: translateY(-5px);
    border-color: #3b82f6;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.section-header h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0;
    color: #1f2937;
}

.btn-edit {
    color: #3b82f6;
    background-color: #eff6ff;
    border: none;
    border-radius: 5px;
    padding: 8px 16px;
    transition: all 0.3s;
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-edit:hover {
    background-color: #dbeafe;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

/* Info Items */
.info-item {
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.info-item label {
    display: block;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 8px;
    font-weight: 500;
}

.info-item p {
    font-weight: 600;
    margin: 0;
    padding: 8px 0;
    color: #1f2937;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.info-item:hover p {
    border-bottom-color: #e5e7eb;
}

/* Preference Toggles */
.preference-toggles {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 10px;
}

.preference-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.preference-toggle:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.preference-toggle h5 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.preference-toggle p {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
}

.form-check-input {
    width: 3rem;
    height: 1.5rem;
}

.form-check-input:checked {
    background-color: #3b82f6;
    border-color: #3b82f6;
}

/* Security Options */
.security-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.security-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.security-option:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.security-option h5 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.security-option p {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
}

.security-option .btn {
    transition: all 0.3s ease;
}

.security-option .btn:hover {
    transform: translateY(-2px);
}

/* Danger Zone */
.danger-zone {
    border: 1px dashed #ef4444;
}

.danger-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background-color: #fef2f2;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.danger-option:hover {
    background-color: #fee2e2;
}

.danger-option h5 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: #b91c1c;
}

.danger-option p {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
}

.danger-option .btn {
    transition: all 0.3s ease;
}

.danger-option .btn:hover {
    background-color: #ef4444;
    color: white;
}

/* Edit Forms (initially hidden) */
.edit-form {
    display: none;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.edit-form.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.animate-fadeIn {
    animation: fadeIn 0.5s ease-out;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

/* Responsive Styles */
@media (max-width: 991px) {
    .account-sidebar {
        margin-bottom: 30px;
        position: static;
    }
    
    .account-section {
        padding: 40px 0;
    }
    
    /* Mobile sidebar redesign */
    .account-user {
        flex-direction: row;
        text-align: left;
        padding: 15px;
        background: linear-gradient(135deg, #3b82f6, #0d9488);
        border-radius: 10px;
        color: white;
        border-bottom: none;
        margin-bottom: 15px;
    }
    
    .account-avatar {
        width: 50px;
        height: 50px;
        margin-right: 12px;
        border: 2px solid rgba(255, 255, 255, 0.3);
    }
    
    .account-info h4 {
        color: white;
        font-size: 1.1rem;
    }
    
    .account-info p {
        color: rgba(255, 255, 255, 0.8);
        font-size: 0.85rem;
    }
}

@media (max-width: 767px) {
    /* Show mobile menu toggle */
    .mobile-menu-toggle {
        display: block;
    }
    
    /* Show mobile account header */
    .mobile-account-header {
        display: flex;
    }
    
    /* Hide desktop sidebar on mobile */
    .account-sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 280px;
        height: 100vh;
        background: white;
        z-index: 1000;
        transition: left 0.3s ease;
        overflow-y: auto;
        padding: 20px;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    }
    
    .account-sidebar.active {
        left: 0;
    }
    
    /* Mobile overlay */
    .mobile-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    
    .mobile-overlay.active {
        opacity: 1;
        visibility: visible;
    }
    
    /* Close button for mobile sidebar */
    .mobile-sidebar-close {
        position: absolute;
        top: 15px;
        right: 15px;
        background: none;
        border: none;
        font-size: 1.5rem;
        color: #666;
        cursor: pointer;
        padding: 5px;
        border-radius: 50%;
        transition: all 0.3s ease;
    }
    
    .mobile-sidebar-close:hover {
        background-color: #f5f5f5;
        color: #ef4444;
    }
    
    .account-content {
        padding: 20px;
    }
    
    .account-section-card {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .section-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }
    
    .section-header h3 {
        font-size: 1.1rem;
    }
    
    .btn-edit {
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    .security-option, .preference-toggle, .danger-option {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        padding: 20px;
    }
    
    .security-option .btn, 
    .danger-option .btn {
        width: 100%;
        margin-top: 10px;
    }
    
    /* Ensure avatar image is always visible on mobile */
    .account-avatar {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .account-avatar img {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: 100% !important;
        height: 100% !important;
    }
    
    /* Mobile card improvements */
    .info-item {
        margin-bottom: 15px;
        padding: 10px;
        background: white;
        border-radius: 6px;
        border-left: 3px solid #3b82f6;
    }
    
    .info-item label {
        font-weight: 600;
        color: #374151;
        margin-bottom: 8px;
    }
    
    .info-item p {
        color: #1f2937;
        font-weight: 500;
    }
}

@media (max-width: 575px) {
    .account-section {
        padding: 20px 0;
    }
    
    .account-content {
        padding: 15px;
    }
    
    .account-section-card {
        padding: 15px;
    }
    
    .account-header h2 {
        font-size: 1.4rem;
    }
    
    .section-header h3 {
        font-size: 1rem;
    }
    
    .btn-edit {
        padding: 5px 10px;
        font-size: 0.75rem;
    }
    
    /* Enhanced mobile user section */
    .account-user {
        padding: 12px;
        margin-bottom: 12px;
    }
    
    .account-avatar {
        width: 45px;
        height: 45px;
        margin-right: 10px;
    }
    
    .account-info h4 {
        font-size: 1rem;
        margin-bottom: 2px;
    }
    
    .account-info p {
        font-size: 0.8rem;
    }
    
    /* Mobile menu improvements */
    .account-menu-item {
        padding: 10px 12px;
        margin-bottom: 3px;
        border-radius: 6px;
    }
    
    .account-menu-item i {
        font-size: 1.1rem;
        margin-right: 8px;
    }
    
    .account-menu-item span {
        font-size: 0.9rem;
    }
}