/* profile.css - Fixed Version */
/* Import Unified Color Palette */
@import url('colors.css');
/* Import Unified Header Styles */
@import url('header.css');
/* Import Unified Button Styles */
@import url('buttons.css');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bgGradient);
    line-height: 1.6;
    padding: 100px 40px 60px;
}

/* Header is already fixed in header.css */
header.header,
header.headerr {
    position: fixed;
    top: 0;
    left: 0;
}

.profile-container {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    min-height: 85vh;
}

/* Sidebar Styles */
.profile-sidebar {
    width: 350px;
    background: var(--greenLight);
    padding: 40px 30px;
    border-right: 1px solid var(--greenLightActive);
}

.user-info {
    text-align: center;
    margin-bottom: 40px;
}

.user-avatar {
    position: relative;
    margin-bottom: 15px;
}

.user-avatar img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid var(--greenNormal);
    object-fit: cover;
}

.change-avatar-btn {
    background: var(--greenNormal);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 12px;
    transition: all 0.3s;
}

.change-avatar-btn:hover {
    background: var(--greenNormalHover);
    transform: translateY(-2px);
}

.user-name {
    color: var(--greenDarker);
    margin-bottom: 8px;
    font-size: 22px;
    font-weight: 600;
}

.user-email {
    color: var(--greenDark);
    font-size: 16px;
}

.profile-nav {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.nav-item {
    background: none;
    border: none;
    padding: 18px 25px;
    text-align: left;
    cursor: pointer;
    border-radius: 12px;
    transition: all 0.3s;
    color: var(--greenDarker);
    font-size: 17px;
    font-weight: 500;
}

.nav-item:hover {
    background: var(--greenLightHover);
}

.nav-item.active {
    background: var(--greenNormal);
    color: white;
}

/* Main Content Styles */
.profile-content {
    flex: 1;
    padding: 50px;
    position: relative;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.tab-content h2 {
    color: var(--greenDarker);
    margin-bottom: 40px;
    border-bottom: 3px solid var(--greenLight);
    padding-bottom: 15px;
    font-size: 28px;
}

.tab-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.tab-header h2 {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

/* Form Styles */
.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

.form-group {
    margin-bottom: 28px;
}

.form-group label {
    display: block;
    margin-bottom: 12px;
    color: var(--greenDark);
    font-weight: 600;
    font-size: 16px;
}

.form-group input {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid var(--greenLightActive);
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--greenNormal);
}

/* Button Styles - Use unified buttons */
/* Save and Add buttons use unified button styles from buttons.css */
.save-btn, .add-address-btn, .add-payment-btn {
    padding: 16px 35px;
    border-radius: 10px;
    font-size: 17px;
    font-weight: 600;
}

/* Card Styles */
.address-card, .payment-card {
    border: 2px solid var(--greenLight);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    transition: border-color 0.3s;
}

.address-card:hover, .payment-card:hover {
    border-color: var(--greenLightActive);
}

.address-header, .payment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.default-badge {
    background: var(--greenNormal);
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
}

/* Action Buttons */
.address-actions, .payment-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.edit-btn, .delete-btn, .set-default-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.edit-btn {
    background: var(--greenLight);
    color: var(--greenDarker);
}

.edit-btn:hover {
    background: var(--greenLightHover);
}

.delete-btn {
    background: #fee;
    color: #c33;
}

.delete-btn:hover {
    background: #fdd;
}

.set-default-btn {
    background: var(--greenLight);
    color: var(--greenDarker);
}

.set-default-btn:hover {
    background: var(--greenLightHover);
}

/* Security Toggle Switches */
.security-options {
    margin-top: 40px;
}

.security-options h3 {
    color: var(--greenDarker);
    margin-bottom: 20px;
}

.toggle-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid var(--greenLight);
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--greenNormal);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

/* FIX FOR SHAKING - NO TRANSITIONS */
.profile-container * {
    transition: none !important;
    animation: none !important;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Responsive Design */
@media (max-width: 768px) {
    .profile-container {
        flex-direction: column;
        margin: 10px;
    }
    
    .profile-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--greenLightActive);
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .tab-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
}