﻿/* Content Area */
.settings-content-panel {
    flex-grow: 1;
    padding: 30px;
    overflow-y: auto;
}

/* --- Section & Typography --- */
.settings-section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.settings-description {
    font-size: 0.85rem;
    color: #666;
    margin-top: -10px;
    margin-bottom: 20px;
    line-height: 1.4;
    margin-bottom: 24px;
}

/* --- Form Elements --- */
.form-group {
    margin-bottom: 20px;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border: 1px solid #eee;
}

.form-row {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 10px;
}

.form-label {
    font-weight: 500;
    font-size: 0.9rem;
    color: #444;
    display: block;
    margin-bottom: 8px;
}

.styled-input {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.styled-input:focus {
    outline: none;
    border-color: var(--color-primary, #003657);
    box-shadow: 0 0 0 3px rgba(0, 54, 87, 0.1);
}

/* --- Cover Image Area --- */
.cover-image-wrapper {
    position: relative;
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 5px;
    transition: border-color 0.2s;
    margin-bottom: 24px;
    cursor: pointer;
}

.cover-image-wrapper:hover {
    border-color: var(--color-primary, #003657);
}

#postCoverImgPreview {
    width: 100%;
    height: 180px;
    background-color: #f0f0f0;
    border-radius: 6px;
    position: relative;
}

.cover-btn-overlay {
    margin-top: 10px;
    width: 100%;
}

/* --- Modern Table (User Groups) --- */
.modern-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    margin-bottom: 24px;
}

.modern-table th {
    background-color: #f8f9fa;
    text-align: left;
    padding: 12px 15px;
    font-weight: 600;
    color: #555;
    border-bottom: 2px solid #eee;
}

.modern-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    color: #333;
}

.modern-table tr:last-child td {
    border-bottom: none;
}

.modern-table tr:hover {
    background-color: #fbfbfb;
}

.table-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--color-primary, #003657);
}

/* --- Map & Admin Specifics --- */
.map-preview-container {
    border: 1px solid #ccc;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.05);
}

.input-group {
    display: flex;
    gap: 0;
}

.input-group input {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.input-group button {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

#settingsAddAuthorButton {
    width: 100px;
}

/* --- Author List Styling --- */
.author-management-container {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

.author-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.author-header h3 {
    margin: 0;
    font-size: 1rem;
    color: #333;
}

.author-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.author-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: #f9f9f9;
    border-radius: 6px;
    border: 1px solid #eee;
    transition: background 0.2s;
}

.author-item:hover {
    background: #f0f4f8;
    border-color: #d0e1f0;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    color: #444;
}

.author-avatar-placeholder {
    width: 28px;
    height: 28px;
    background-color: var(--color-primary, #003657);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
    background-size: cover;
    background-position: center center;
}

.btn-remove-author {
    color: #999;
    cursor: pointer;
    padding: 5px;
    transition: color 0.2s;
}

.btn-remove-author:hover {
    color: #dc3545;
}

/* --- Search Modal Styling --- */
.author-search-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
}

.author-search-modal {
    background: white;
    width: 400px;
    max-width: 90%;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.2s ease-out;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-header {
    padding: 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h4 { margin: 0; font-size: 1rem; }

.modal-close { cursor: pointer; color: #666; }

.modal-body { padding: 15px; }

.search-results-container {
    max-height: 250px;
    overflow-y: auto;
    margin-top: 10px;
    border: 1px solid #eee;
    border-radius: 6px;
}

.search-result-item {
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid #f5f5f5;
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-result-item:last-child { border-bottom: none; }

.search-result-item:hover {
    background-color: #f0f8ff;
}

/* --- Author List Container --- */
.author-list-wrapper {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden; /* Keeps children inside rounded corners */
    margin-bottom: 15px;
}

/* --- The Individual Author Row --- */
.author-list-row {
    display: flex;
    align-items: center; /* Perfect vertical alignment */
    justify-content: space-between; /* Pushes name left, actions right */
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.author-list-row:last-child {
    border-bottom: none;
}

.author-list-row:hover {
    background-color: #f8f9fa;
}

/* --- Left Side: Name & Avatar --- */
.author-name-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-name-text {
    font-size: 0.95rem;
    font-weight: 500;
    color: #333;
}

/* --- Right Side: Actions (Eye + Delete) --- */
.author-actions-group {
    display: flex;
    align-items: center;
    gap: 10px; /* Spacing between the Eye and the X */
}

/* --- Action Buttons (Common) --- */
.action-btn-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    cursor: pointer;
    border: none;
    background: transparent;
    transition: all 0.2s;
    font-size: 1rem;
}

/* --- Specific: Visibility Toggle (Eye) --- */
.action-btn-icon.toggle-visible {
    color: #999; /* Default (Hidden state) */
}

.action-btn-icon.toggle-visible:hover {
    background-color: #f0f0f0;
    color: #666;
}

.toggle-visible {
    color: var(--color-primary, #003657) !important; /* Active (Visible) color */
    background-color: rgba(0, 54, 87, 0.05) !important;
}

/* --- Specific: Remove Button (X) --- */
.action-btn-icon.remove-author {
    color: #666;
}

.action-btn-icon.remove-author:hover {
    background-color: #fff1f0;
    color: #dc3545; /* Red on hover */
}