/* =================================================================== */
/* --- ACCOUNT PROFILE "SPOKE" PAGE STYLES --- */
/* =================================================================== */

/* --- Card 1 & 2: Inline Editable Rows --- */
.setting-row-editable {
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.setting-row-editable:first-child { padding-top: 0; }
.setting-row-editable:last-child { border-bottom: none; padding-bottom: 0; }

.setting-row-editable .static-view,
.setting-row-editable .edit-view {
    display: flex;
    justify-content: space-between;
    align-items: flex-start; /* Align top for textareas */
    gap: 20px;
}
.setting-row-editable .static-view .setting-info,
.setting-row-editable .edit-view {
    flex-grow: 1;
}

/* Tweak setting-info for editable rows */
.setting-row-editable .setting-info {
    gap: 8px;
    padding-right: 0;
}
.setting-row-editable .setting-description {
    font-size: 1rem;
    color: #fff;
    font-style: normal;
}
.setting-row-editable .setting-description.is-bio {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
    line-height: 1.5;
    white-space: pre-wrap; /* Respect newlines in bio */
}
.setting-row-editable .setting-description:empty::after {
    content: '...';
    font-style: italic;
    color: rgba(255, 255, 255, 0.5);
}

/* Edit View Styles */
.setting-row-editable .edit-view {
    flex-direction: column;
    gap: 15px;
}
.setting-row-editable .dossier-input {
    width: 100%;
    padding: 10px 12px;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 4px;
    color: #f1f1f1;
    font-size: 1rem;
    box-sizing: border-box;
}
.setting-row-editable .dossier-input:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 10px rgba(74, 144, 226, 0.5);
}
.setting-row-editable textarea.dossier-input {
    min-height: 100px;
    resize: vertical;
    font-family: inherit;
    line-height: 1.5;
}

.edit-actions {
    display: flex;
    gap: 10px;
    align-self: flex-end;
}

/* Bio Character Counter */
.bio-textarea-wrapper {
    position: relative;
    width: 100%;
}
#bio-char-count {
    position: absolute;
    bottom: 8px;
    right: 12px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
    pointer-events: none;
}
#bio-input {
    padding-bottom: 25px !important;
}

/* Cooldown message */
.cooldown-message {
    font-size: 0.85rem;
    color: #fd7e14; /* Orange warning */
}

/* --- Card 3: Profile Picture --- */
.profile-picture-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
}
.profile-picture-large-preview {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.2);
}
.form-help-text {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

/* --- Card 4: Operative ID --- */
.static-id-display {
    font-family: monospace;
    color: #4a90e2;
    font-size: 1rem;
    font-weight: 500;
}

/* --- General Utilities --- */
.hidden {
    display: none !important;
}


/*
.setting-row-editable .setting-title .cooldown-message {
    display: inline;
    font-weight: 400; 
    margin-left: 8px;
    font-style: italic;
}

.setting-row-editable .setting-title .cooldown-message:not(.hidden)::before {
    content: '[';
    margin-right: 4px;
}
.setting-row-editable .setting-title .cooldown-message:not(.hidden)::after {
    content: ']';
    margin-left: 4px;
}
*/

/* --- Bio Truncation & View Note --- */
.setting-row-editable[data-field="bio"] .setting-description.is-bio {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 300px; /* Adjust as needed */
}

.setting-row-editable[data-field="bio"] .bio-view-note {
    margin-top: 8px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
}


/* --- [NEW] Bio Edit Modal Styles --- */

#bio-edit-modal-content .bio-textarea-wrapper {
    position: relative;
    width: 100%;
}

/* [FIX] Base styles for the modal's textarea */
#bio-edit-modal-content textarea.dossier-input {
    /* Base Styles */
    width: 100%;
    padding: 10px 12px;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 4px;
    color: #f1f1f1;
    font-size: 1rem;
    box-sizing: border-box;
    
   /* Specific Styles */
    min-height: 120px;
    resize: none;
    font-family: inherit;
    line-height: 1.5;
    padding-bottom: 25px !important;
}
#bio-edit-modal-content textarea.dossier-input:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 10px rgba(74, 144, 226, 0.5);
}
/* [END FIX] */

#bio-edit-modal-content #bio-edit-modal-char-count {
    position: absolute;
    bottom: 8px;
    right: 12px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
    pointer-events: none;
}

/* Footer styles (copied from account-spoke.css) */
.custom-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 15px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
}

/* [FIX] Explicitly re-style buttons inside this footer */
.custom-modal-footer .action-btn {
    font-size: 0.9rem;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.2s ease;
    background-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    flex-shrink: 0;
}
.custom-modal-footer .action-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.4);
}
.custom-modal-footer .action-btn.primary {
    background-color: #4a90e2;
    color: #fff;
    border-color: #4a90e2;
}
.custom-modal-footer .action-btn.primary:hover {
    background-color: #5aa1f2;
    border-color: #5aa1f2;
}
.custom-modal-footer .action-btn.secondary {
    /* This class is for the gray button, which is the default */
}
.custom-modal-footer .action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* --- Profile Preview Modal Styles --- */
.profile-preview-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(9, 10, 15, 0.85);
    backdrop-filter: blur(5px);
    z-index: 6000; /* Higher than other modals */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    cursor: pointer;
}
.profile-preview-modal-overlay.is-visible {
    opacity: 1;
    visibility: visible;
}
#profile-preview-modal-content {
    cursor: default;
    transform: scale(0.95);
    transition: transform 0.3s ease;
    max-width: 90%;
}
.profile-preview-modal-overlay.is-visible #profile-preview-modal-content {
    transform: scale(1);
}

/* Profile Card Styles (Shared from Hub) */
.profile-card {
    background: rgba(15, 17, 26, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 340px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}
.profile-card .card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 0;
    border: none;
}
.profile-card .card-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    object-fit: cover;
}
.profile-card .card-display-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 4px;
}
.profile-card .card-status {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    gap: 8px;
}
.profile-card .status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.status-dot.online { background-color: #28a745; }
.status-dot.busy { background-color: #f56c6c; }
.status-dot.afk { background-color: #fd7e14; }
.status-dot.offline { background-color: #6c757d; }

.profile-card .card-bio {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.5;
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 8px;
    min-height: 60px;
}
.profile-card .card-bio.is-empty {
    font-style: italic;
    color: rgba(255, 255, 255, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
}
.profile-card .card-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 15px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.4);
    text-align: center;
    margin: 0;
    background: transparent;
}