@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css');
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* NOTE: All navigation styling (including top-nav, brand logo, and shopping cart icon)
   should come EXCLUSIVELY from nav-header.css to ensure consistency across pages */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

/* Theme switcher spacing moved to nav-header.css for consistency across all pages */

body {
    background-color: #f9f9f9;
    transition: background 0.3s ease, color 0.3s ease;
    overflow-x: hidden; /* Prevent horizontal scrolling */
}

body.dark {
    background-color: #1a1a1a;
}

/* Sidebar and navigation styling removed - now handled by nav-header.css */

/* Additional sidebar elements styling removed - now handled by nav-header.css */

/* More navigation styling removed - now handled by nav-header.css */

/* Navigation-related styles including dark mode button and sidebar close button removed - now handled by nav-header.css */

#check:checked ~ .sidebar_menu .btn_two {
    opacity: 1;
}

#check:checked ~ .sidebar_menu {
    left: 0;
}

#check:checked ~ .btn_one {
    opacity: 0; /* Hide the hamburger icon */
}

/* Settings Container */
.settings-container {
    max-width: 800px;
    margin: 80px auto;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: background 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
    padding: 15px;
}

body.dark .settings-container {
    background: #252525;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.settings-container h1 {
    font-size: 32px;
    margin-bottom: 30px;
    text-align: center;
}

/* Settings Sections */
.settings-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f8f8;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: background 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    width: 100%;
    max-width: 100%;
}

body.dark .settings-section {
    background: #333;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.settings-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.settings-section h2 i {
    font-size: 1.5rem;
}

.settings-item {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
}

.settings-item label,
.settings-item .setting-label {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

/* Settings item with label and control on same line */
.settings-item.row {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

/* Theme options */
.theme-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 0.5rem;
}

.theme-btn {
    padding: 0.6rem 1.25rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.9rem;
}

.theme-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.theme-btn.active {
    border: 2px solid #ff6f61;
    box-shadow: 0 4px 8px rgba(255, 111, 97, 0.3);
}

.theme-btn.light {
    background: #f8f8f8;
    border: 1px solid #ddd;
}

body.dark .theme-btn.light {
    background: #454545;
    border: 1px solid #555;
}

.theme-btn.dark {
    background: #333;
    border: 1px solid #222;
}

body.dark .theme-btn.dark {
    background: #222;
    border: 1px solid #111;
}

.theme-btn.system {
    background: linear-gradient(to right, #f8f8f8 50%, #333 50%);
    border: 1px solid #ddd;
}

body.dark .theme-btn.system {
    border: 1px solid #555;
}

.theme-btn.auto {
    background: linear-gradient(to right, #64b5f6, #1a237e);
    border: none;
}

/* Auto theme settings */
.auto-theme-settings {
    background: rgba(100, 181, 246, 0.1);
    border-radius: 8px;
    padding: 15px;
    margin-top: 10px;
    border: 1px solid rgba(100, 181, 246, 0.3);
    transition: all 0.3s ease;
}

body.dark .auto-theme-settings {
    background: rgba(100, 181, 246, 0.05);
    border: 1px solid rgba(100, 181, 246, 0.2);
}

.auto-theme-settings small {
    display: block;
    margin-top: 10px;
    font-size: 0.8rem;
}

.time-settings {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 10px;
}

.time-setting-item {
    flex: 1;
    min-width: 200px;
}

.time-setting-item span {
    display: block;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.time-setting-item input[type="time"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    font-size: 0.9rem;
}

body.dark .time-setting-item input[type="time"] {
    background: #333;
    border: 1px solid #444;
}

/* Toggle Switches */
.check {
    position: relative;
    display: inline-block;
}

.check input[type="checkbox"] {
    appearance: none;
    position: relative;
    width: 50px;
    height: 26px;
    background: #ccc;
    border-radius: 50px;
    outline: none;
    transition: background 0.3s;
    cursor: pointer;
}

body.dark .check input[type="checkbox"] {
    background: #555;
}

.check input[type="checkbox"]:checked {
    background: #ff6f61;
}

.check input[type="checkbox"]::before {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    top: 2px;
    left: 2px;
    transition: 0.3s;
}

body.dark .check input[type="checkbox"]::before {
    background: #ddd;
}

.check input[type="checkbox"]:checked::before {
    left: 26px;
}

/* Remove old toggle styles if they exist */
.toggle-input,
.toggle-label,
.toggle-ball {
    display: none;
}

/* IMPORTANT: Exclude navigation elements from Settings.css styling */
body.dark.settings-page .top-nav .nav-cart,
body.dark.settings-page .top-nav .nav-cart i,
body.dark.settings-page .top-nav .theme-toggle i {
  /* Reset any overrides to ensure these elements use only nav-header.css styling */
  color: inherit;
  -webkit-text-fill-color: initial;
  background-clip: initial;
  background: initial;
}

/* Profile picture section */
.profile-picture-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 1.5rem;
}

.profile-picture-display {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 1rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border: 4px solid #fff;
    transition: all 0.3s ease;
}

body.dark .profile-picture-display {
    border: 4px solid #333;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.profile-picture-display img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.profile-info h3 {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

/* Buttons */
.edit-profile-btn, 
.save-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    gap: 0.5rem;
    box-shadow: 0 4px 8px rgba(255, 111, 97, 0.3);
    margin-top: 0.5rem;
}

.edit-profile-btn:hover, 
.save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(255, 111, 97, 0.4);
}

.edit-profile-btn:active, 
.save-btn:active {
    transform: translateY(0);
}

.edit-profile-btn {
    margin: 0 auto;
    display: flex;
}

.save-btn {
    margin: 1.5rem auto;
    min-width: 180px;
}

/* Save Status Message */
.save-status {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: #4CAF50;
    padding: 12px 24px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    animation: fade-in-out 2s forwards;
}

.save-status i {
    font-size: 1.25rem;
}

@keyframes fade-in-out {
    0% { opacity: 0; transform: translate(-50%, 20px); }
    15% { opacity: 1; transform: translate(-50%, 0); }
    85% { opacity: 1; transform: translate(-50%, 0); }
    100% { opacity: 0; transform: translate(-50%, -20px); }
}

/* Profile Preview Styles */
.profile-preview {
    display: flex;
    align-items: center;
    gap: 20px;
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

body.dark .profile-preview {
    background: #2a2a2a;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.profile-preview .profile-pic {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #ff6f61;
}

.profile-preview .profile-info {
    flex: 1;
}

.profile-preview .profile-info h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.profile-preview .profile-info p {
    margin: 5px 0 0;
    font-size: 14px;
}

.profile-preview .profile-info .email-display {
    font-style: italic;
    margin-top: 5px;
}

.profile-preview .profile-info .bio-display {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #eee;
    font-size: 14px;
    line-height: 1.4;
    max-width: 300px;
}

body.dark .profile-preview .profile-info .bio-display {
    border-top: 1px solid #444;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #fff;
    font-size: 15px;
    transition: all 0.2s ease;
}

body.dark .form-group input,
body.dark .form-group textarea,
body.dark .form-group select {
    background-color: #2a2a2a;
    border: 1px solid #444;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: #ff6f61;
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 111, 97, 0.2);
}

.form-group input[readonly] {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

body.dark .form-group input[readonly] {
    background-color: #333;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn.primary {
    background-color: #ff6f61;
}

.btn.primary:hover {
    background-color: #ff5c4d;
}

.btn.secondary {
    background-color: #f0f0f0;
}

body.dark .btn.secondary {
    background-color: #444;
}

.btn.secondary:hover {
    background-color: #e5e5e5;
}

body.dark .btn.secondary:hover {
    background-color: #555;
}

/* Utility Classes */
.button-container {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
    .settings-container {
        margin: 60px auto;
        padding: 15px;
    }
    
    .settings-section {
        padding: 1.25rem;
    }
}

@media (max-width: 768px) {
    .settings-container {
        margin: 50px auto;
        padding: 15px;
        border-radius: 8px;
    }
    
    .settings-container h1 {
        font-size: 28px;
        margin-bottom: 20px;
    }
    
    .theme-options {
        flex-direction: column;
    }
    
    .theme-btn {
        width: 100%;
    }
    
    .time-settings {
        flex-direction: column;
        gap: 10px;
    }
    
    .time-setting-item {
        min-width: initial;
    }
    
    .settings-item.row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .settings-item.row .setting-label {
        margin-bottom: 10px;
    }
}

@media (max-width: 480px) {
    .main_box .btn_one {
        left: 15px;
        top: 15px;
    }
    
    .settings-container {
        margin: 60px auto 20px;
        padding: 12px;
    }
    
    .settings-section {
        padding: 1rem;
    }
    
    .settings-section h2 {
        font-size: 1.25rem;
    }
    
    .profile-picture-display {
        width: 100px;
        height: 100px;
    }
    
    .edit-profile-btn, 
    .save-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
}