﻿/* profile.css - Account preferences, profile, settings page styles */

/* ==================== ACCOUNT PREFERENCES STYLES ==================== */
.preferences-content {
    padding: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.preferences-content h2 {
    font-size: 1.75rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.nav-tabs .nav-link {
    color: #6c757d;
    border: none;
    padding: 0.75rem 1.5rem;
}

.nav-tabs .nav-link.active {
    color: #1E6332;
    border-bottom: 2px solid #1E6332;
    background: transparent;
}

/* ==================== FOOTER STYLES ==================== */
.main-footer {
    background-color: #fff;
    border-top: 1px solid #dee2e6;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    position: fixed;
    bottom: 0;
    left: var(--sidebar-width-expanded);
    right: 0;
    z-index: 100;
    transition: var(--sidebar-transition);
}

.sidebar-collapsed .main-footer {
    left: var(--sidebar-width-collapsed);
}

.footer-logo {
    height: 32px;
}

.footer-brand {
    font-weight: 600;
}

/* ==================== PROFILE & USER STYLES ==================== */
.profile-avatar-container {
    position: relative;
    display: inline-block;
}

.role-indicator {
    position: absolute;
    bottom: 0;
    right: -2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #fff;
}

.role-indicator.admin {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.role-indicator.standard {
    background: linear-gradient(135deg, #18A74B, #2F8542);
}

.profile-menu-header {
    display: flex;
    align-items: center;
    padding: 1rem;
    gap: 0.75rem;
}

.profile-menu-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
}

.profile-menu-name {
    font-weight: 600;
    color: #1f2937;
    font-size: 0.95rem;
}

.profile-menu-email {
    font-size: 0.8rem;
    color: #6b7280;
}

/* ==================== ENHANCED PROFILE PAGE ==================== */
.profile-page-container {
    max-width: 1000px;
    margin: 0 auto;
}

.profile-header {
    background: linear-gradient(135deg, #1E6332 0%, #2F8542 100%);
    border-radius: 1rem;
    padding: 2rem;
    color: #fff;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Profile avatar edit wrapper */
.profile-avatar-edit-wrapper {
    position: relative;
    width: 100px;
    height: 100px;
    flex-shrink: 0;
}

.profile-header-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid rgba(255,255,255,0.3);
    object-fit: cover;
    background: #fff;
}

.profile-avatar-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 36px;
    background: rgba(0,0,0,0.55);
    border-radius: 0 0 50px 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.25s;
}

.profile-avatar-edit-wrapper:hover .profile-avatar-overlay {
    opacity: 1;
}

.profile-avatar-overlay i {
    color: #fff;
    font-size: 14px;
}

.profile-avatar-menu {
    display: none;
    position: absolute;
    top: 105px;
    left: 0;
    min-width: 180px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.18);
    z-index: 50;
    overflow: hidden;
}

.profile-avatar-menu.open {
    display: block;
}

.profile-avatar-menu button {
    display: flex;
    align-items: center;
    width: 100%;
    border: none;
    background: none;
    padding: 10px 16px;
    font-size: 0.875rem;
    font-family: 'Futura PT', 'Jost', sans-serif;
    color: #1f2937;
    cursor: pointer;
    transition: background 0.15s;
}

.profile-avatar-menu button:hover {
    background: #f3f4f6;
}

.profile-avatar-menu button:last-child {
    color: #dc3545;
}

.profile-avatar-menu button:last-child:hover {
    background: #fff5f5;
}

.profile-header-info h2 {
    margin: 0 0 0.25rem 0;
    font-size: 1.75rem;
}

.profile-header-info p {
    margin: 0;
    opacity: 0.9;
}

.profile-role-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0.5rem;
}

.profile-role-badge.admin {
    background: rgba(255,255,255,0.2);
    color: #fff;
}

.profile-role-badge.standard {
    background: rgba(255,255,255,0.2);
    color: #fff;
}

.profile-tabs {
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow: hidden;
}

.profile-tabs .nav-tabs {
    border-bottom: 2px solid #e9ecef;
    padding: 0 1rem;
    background: #f8f9fa;
}

.profile-tabs .nav-tabs .nav-link {
    border: none;
    color: #6c757d;
    padding: 1rem 1.5rem;
    font-weight: 500;
    position: relative;
    transition: all 0.3s ease;
}

.profile-tabs .nav-tabs .nav-link:hover {
    color: #1E6332;
}

.profile-tabs .nav-tabs .nav-link.active {
    color: #1E6332;
    background: transparent;
}

.profile-tabs .nav-tabs .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: #1E6332;
    border-radius: 3px 3px 0 0;
}

.profile-tabs .nav-tabs .nav-link i {
    margin-right: 0.5rem;
}

.profile-tab-content {
    padding: 2rem;
}

.profile-section {
    margin-bottom: 2rem;
}

.profile-section:last-child {
    margin-bottom: 0;
}

.profile-section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.profile-section-title i {
    color: #1E6332;
}

.form-floating-custom {
    position: relative;
    margin-bottom: 1rem;
}

.form-floating-custom label {
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
    display: block;
}

.security-card {
    background: #f8f9fa;
    border-radius: 0.75rem;
    padding: 1.25rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.security-card-info h6 {
    margin: 0 0 0.25rem 0;
    font-weight: 600;
}

.security-card-info p {
    margin: 0;
    font-size: 0.875rem;
    color: #6b7280;
}

.preference-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #e9ecef;
}

.preference-item:last-child {
    border-bottom: none;
}

.preference-info h6 {
    margin: 0 0 0.25rem 0;
    font-weight: 500;
}

.preference-info p {
    margin: 0;
    font-size: 0.875rem;
    color: #6b7280;
}

/* ==================== SETTINGS PAGE ==================== */
.settings-container {
    max-width: 900px;
    margin: 0 auto;
}

.settings-card {
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.settings-card-header {
    background: #f8f9fa;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.settings-card-header i {
    color: #1E6332;
    font-size: 1.25rem;
}

.settings-card-header h5 {
    margin: 0;
    font-weight: 600;
}

.settings-card-body {
    padding: 1.5rem;
}

.settings-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1rem 0;
    border-bottom: 1px solid #f3f4f6;
}

.settings-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.settings-item:first-child {
    padding-top: 0;
}

.settings-item-info {
    flex: 1;
    padding-right: 1rem;
}

.settings-item-info h6 {
    margin: 0 0 0.25rem 0;
    font-weight: 500;
    color: #1f2937;
}

.settings-item-info p {
    margin: 0;
    font-size: 0.875rem;
    color: #6b7280;
}

/* Custom Toggle Switch */
.toggle-switch {
    position: relative;
    width: 50px;
    height: 26px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #e5e7eb;
    transition: 0.3s;
    border-radius: 34px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.toggle-switch input:checked + .toggle-slider {
    background-color: #1E6332;
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

/* ==================== PHOTO CROP EDITOR ==================== */
.photo-crop-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.88);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.photo-crop-modal.show {
    display: flex;
}

.photo-crop-container {
    background: #1a1a1a;
    border-radius: 16px;
    width: 480px;
    max-width: 95vw;
    max-height: 95vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
}

.photo-crop-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.photo-crop-header h5 {
    margin: 0;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
}

.photo-crop-close {
    background: none;
    border: none;
    color: #666;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.15s;
}

.photo-crop-close:hover {
    color: #fff;
}

.photo-crop-canvas-wrap {
    width: 100%;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    overflow: hidden;
    background: #111;
    touch-action: none;
}

.photo-crop-canvas-wrap:active {
    cursor: grabbing;
}

.photo-crop-canvas-wrap canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.photo-crop-controls {
    padding: 14px 20px 8px;
}

.photo-crop-zoom {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #888;
    font-size: 14px;
}

.photo-crop-zoom input[type="range"] {
    flex: 1;
    -webkit-appearance: none;
    height: 4px;
    border-radius: 2px;
    background: #333;
    outline: none;
}

.photo-crop-zoom input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #1E6332;
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.photo-crop-zoom input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #1E6332;
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.photo-crop-info {
    text-align: center;
    color: #666;
    font-size: 0.75rem;
    margin-top: 8px;
    letter-spacing: 0.2px;
}

.photo-crop-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 12px 20px 18px;
}

.photo-crop-actions .btn-outline-secondary {
    color: #ccc;
    border-color: #444;
}

.photo-crop-actions .btn-outline-secondary:hover {
    background: #333;
    color: #fff;
    border-color: #555;
}
