/* Account Page Styles - Dark Theme */

.profile-container {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .profile-container {
        padding: 1rem;
        border-radius: 12px;
    }
}

.profile-header {
    display: flex;
    gap: 2rem;
    align-items: center;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 2rem;
    width: 100%;
}

@media (max-width: 768px) {
    .profile-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
        padding-bottom: 1.5rem;
        margin-bottom: 1.5rem;
    }
}

.profile-picture-container {
    position: relative;
    flex-shrink: 0;
}

.profile-picture {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--border);
}

@media (max-width: 768px) {
    .profile-picture {
        width: 120px;
        height: 120px;
    }
}

.picture-upload-form {
    margin-top: 1rem;
}

.file-upload-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--primary);
    color: black;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.file-upload-label:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

.profile-info {
    flex: 1;
    min-width: 0;
}

.profile-info h2 {
    margin: 0 0 0.5rem 0;
    font-size: 2rem;
    color: var(--light);
    word-break: break-word;
}

@media (max-width: 768px) {
    .profile-info h2 {
        font-size: 1.5rem;
    }
}

.profile-info .role {
    color: var(--primary);
    font-weight: 600;
    margin: 0.25rem 0;
}

.profile-info .email {
    color: var(--gray);
    margin: 0.25rem 0;
    word-break: break-all;
}

.profile-info .member-since {
    color: var(--gray);
    font-size: 0.875rem;
    margin: 0.5rem 0 0 0;
}

/* Two Column Layout */
.profile-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    width: 100%;
}

@media (max-width: 900px) {
    .profile-columns {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

.profile-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    min-width: 0;
}

.profile-form, .profile-stats, .profile-preferences {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    padding: 1.5rem;
    border-radius: 12px;
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .profile-form, .profile-stats, .profile-preferences {
        padding: 1rem;
    }
}

.profile-form h3, .profile-stats h3, .profile-preferences h3 {
    margin: 0 0 1.5rem 0;
    font-size: 1.25rem;
    color: var(--light);
}

@media (max-width: 768px) {
    .profile-form h3, .profile-stats h3, .profile-preferences h3 {
        font-size: 1.1rem;
        margin: 0 0 1rem 0;
    }
}

.form-section {
    margin-bottom: 2rem;
}

.form-section:last-child {
    margin-bottom: 0;
}

.form-group {
    margin-bottom: 1rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 480px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--light);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 1rem;
    background: rgba(0, 0, 0, 0.3);
    color: var(--light);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(64, 203, 52, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--gray);
}

.form-help {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: var(--gray);
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--light);
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    accent-color: var(--primary);
}

/* Send Emails Toggle - Enhanced Checkbox with Description */
.send-emails-toggle {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.send-emails-toggle .checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    margin-bottom: 0;
}

.send-emails-toggle .checkbox-text {
    font-weight: 600;
    color: var(--light);
    font-size: 1rem;
}

.send-emails-toggle .checkbox-description {
    margin-top: 0.75rem;
    padding-left: 1.75rem;
    font-size: 0.875rem;
    color: var(--gray);
    line-height: 1.5;
}

.send-emails-toggle .checkbox-description ul {
    margin: 0.5rem 0;
    padding-left: 1.25rem;
}

.send-emails-toggle .checkbox-description li {
    margin: 0.25rem 0;
}

.send-emails-toggle .checkbox-description em {
    display: block;
    margin-top: 0.5rem;
    font-style: italic;
    color: var(--primary);
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* Account page buttons inherit from base button style, just need width */
button {
    width: 100%;
}

/* Danger button - color override only */
.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(0, 0, 0, 0.3);
    padding: 1rem;
    border-radius: 6px;
    border: 1px solid var(--border);
}

.stat-icon {
    font-size: 2rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--light);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--gray);
}

.last-activity {
    margin-top: 1rem;
    text-align: center;
    font-size: 0.875rem;
    color: var(--gray);
}

.logout-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.logout-section h4 {
    margin-bottom: 0.5rem;
    color: var(--light);
}

.logout-section p {
    color: var(--gray);
    margin-bottom: 1rem;
}

.logout-btn {
    width: 100%;
}

.danger-zone {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(239, 68, 68, 0.3);
}

.danger-zone h4 {
    color: #ef4444;
    margin-bottom: 0.5rem;
}

.danger-zone p {
    color: var(--gray);
    margin-bottom: 1rem;
}

.notifications-container {
    position: fixed;
    top: 5rem;
    right: 1rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 400px;
}

.notification {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid var(--border);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification-success {
    border-left: 4px solid var(--primary);
}

.notification-error {
    border-left: 4px solid #ef4444;
}

.notification-warning {
    border-left: 4px solid #f59e0b;
}

.notification-info {
    border-left: 4px solid #3b82f6;
}

.notification-icon {
    font-size: 1.5rem;
}

.notification-content {
    flex: 1;
    color: var(--light);
}

.notification-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray);
    padding: 0;
    width: 24px;
    height: 24px;
}

.notification-close:hover {
    color: var(--light);
}

.htmx-indicator {
    display: none;
}

.htmx-request .htmx-indicator {
    display: inline;
}

.htmx-request.htmx-indicator {
    display: inline;
}

.sse-hidden {
    display: none;
}

/* Sidebar Panels */
.sidebar-panel {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    padding: 1.25rem;
    border-radius: 12px;
}

.sidebar-panel h3 {
    margin: 0 0 0.75rem 0;
    font-size: 1.1rem;
    color: var(--light);
}

.sidebar-panel p {
    color: var(--gray);
    margin: 0 0 1rem 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Session Panel (Sign Out) */
.session-panel {
    text-align: center;
}

.session-panel .logout-btn {
    width: 100%;
}

/* Invite Panel */
.invite-panel {
    text-align: center;
}

.invite-stats-inline {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    color: var(--gray);
    font-size: 0.9rem;
}

.invite-stats-inline .stat-item span {
    font-weight: 600;
    color: var(--primary);
}

.invite-stats-inline .stat-divider {
    color: var(--border);
}

/* Danger Panel */
.danger-panel {
    border-color: rgba(239, 68, 68, 0.3);
}

.danger-panel h3 {
    color: #ef4444;
}

/* Form Subsection Headers */
.sidebar-panel h4 {
    margin: 1.5rem 0 1rem 0;
    font-size: 1rem;
    color: var(--light);
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

/* Activity Stats Bar */
.activity-bar {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
    margin-top: 1.5rem;
}

.activity-stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
}

.activity-icon {
    font-size: 1.5rem;
}

.activity-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.activity-label {
    font-size: 0.85rem;
    color: var(--gray);
}

@media (max-width: 600px) {
    .activity-bar {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .activity-stat {
        flex: 0 0 45%;
        justify-content: center;
    }
}

/* Loading state */
.loading {
    text-align: center;
    padding: 3rem;
    color: var(--gray);
}
