/* ==========================================================
   WEBSITE PUBLISHER - ADMIN / INLINE EDITING
   Relies on the CSS variables defined in prr-public.css (:root)
   ========================================================== */

.wp-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(20, 12, 14, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 16px;
}

.wp-modal-overlay[hidden] {
    display: none;
}

.wp-modal {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 360px;
    padding: 28px;
}

.wp-modal h2 {
    margin: 0 0 6px;
    font-size: 1.25rem;
    color: var(--text);
}

.wp-modal-subtitle {
    margin: 0 0 18px;
    font-size: 0.9rem;
    color: var(--muted);
    line-height: 1.4;
}

.wp-modal label {
    display: block;
    font-size: 0.85rem;
    color: var(--text);
    margin-bottom: 6px;
}

.wp-modal input[type="password"] {
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.95rem;
    box-sizing: border-box;
    transition: border-color var(--transition);
}

.wp-modal input[type="password"]:focus {
    outline: none;
    border-color: var(--primary);
}

.wp-modal-error {
    color: #b3261e;
    font-size: 0.85rem;
    margin: -6px 0 14px;
}

.wp-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.wp-btn {
    border: none;
    border-radius: 8px;
    padding: 10px 18px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: opacity var(--transition), background var(--transition);
}

.wp-btn-primary {
    background: var(--primary);
    color: #fff;
}

.wp-btn-primary:hover {
    background: var(--primary-dark);
}

.wp-btn-primary:disabled {
    opacity: 0.6;
    cursor: default;
}

.wp-btn-ghost {
    background: transparent;
    color: var(--muted);
    border: 1px solid var(--border);
}

.wp-btn-ghost:hover {
    background: var(--background);
}

.wp-edit-badge {
    position: fixed;
    left: 16px;
    bottom: 16px;
    z-index: 9999;
    background: var(--primary-dark);
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 999px;
    box-shadow: var(--shadow);
    font-size: 0.85rem;
}

.wp-edit-badge[hidden] {
    display: none;
}

.wp-edit-badge button {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 5px 12px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background var(--transition);
}

.wp-edit-badge button:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ==========================================================
   INLINE EDITING
   ========================================================== */

.wp-editable {
    position: relative;
}

.wp-edit-pencil,
.wp-delete-btn {
    position: absolute;
    bottom: 10px;
    width: 30px;
    height: 30px;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 50%;
    background: rgba(20, 12, 14, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
    opacity: 0;
    pointer-events: none;
    transform: translateY(4px);
    transition: opacity var(--transition), transform var(--transition), background var(--transition), border-color var(--transition);
    z-index: 20;
}

.wp-edit-pencil {
    right: 10px;
}

body.wp-edit-mode .wp-editable:hover > .wp-edit-pencil,
body.wp-edit-mode .wp-editable:focus-within > .wp-edit-pencil {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.wp-edit-pencil:hover {
    background: var(--primary);
    border-color: var(--primary);
}

[data-field].wp-editing-field {
    outline: 2px dashed var(--secondary);
    outline-offset: 4px;
    border-radius: 4px;
    background: rgba(182, 139, 45, 0.08);
}

.wp-link-editor {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin: 10px 0;
    padding: 10px 12px;
    border: 1px dashed var(--border);
    border-radius: 8px;
    background: var(--background);
}

.wp-link-editor label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.78rem;
    color: var(--muted);
    flex: 1 1 160px;
}

.wp-link-editor input {
    padding: 7px 9px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.85rem;
}

.wp-save-bar {
    position: relative;
    z-index: 21;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 16px;
    padding: 10px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.wp-save-status {
    margin-right: auto;
    font-size: 0.82rem;
    color: var(--muted);
}

.wp-save-bar .wp-btn {
    padding: 7px 16px;
    font-size: 0.85rem;
}

.wp-delete-btn {
    right: 46px;
}

body.wp-edit-mode .wp-editable:hover > .wp-delete-btn,
body.wp-edit-mode .wp-editable:focus-within > .wp-delete-btn {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.wp-delete-btn:hover {
    background: #b3261e;
    border-color: #b3261e;
}

.wp-add-item {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 120px;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    background: transparent;
    color: var(--muted);
    font-size: 0.9rem;
    cursor: pointer;
    width: 100%;
    transition: border-color var(--transition), color var(--transition);
}

body.wp-edit-mode .wp-add-item {
    display: flex;
}

.wp-add-item:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.wp-add-form {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
    margin-top: 14px;
}

.wp-add-form label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.8rem;
    color: var(--muted);
}

.wp-add-form input,
.wp-add-form textarea {
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.9rem;
    font-family: inherit;
}

.wp-submission-success {
    background: #e6f4ea;
    border: 1px solid #34a853;
    color: #1e7e34;
    padding: 16px 20px;
    border-radius: var(--radius);
    margin-bottom: 30px;
    font-weight: 600;
}

/* ==========================================================
   PENDING ALUMNI REVIEW
   ========================================================== */

.wp-pending-modal {
    max-width: 640px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

.wp-pending-list {
    overflow-y: auto;
    margin: 18px 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.wp-pending-empty {
    color: var(--muted);
    font-size: 0.9rem;
    text-align: center;
    padding: 20px 0;
}

.wp-pending-item {
    display: flex;
    gap: 14px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--background);
}

.wp-pending-photo,
.wp-pending-photo-placeholder {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.wp-pending-photo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--muted);
}

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

.wp-pending-info h3 {
    font-size: 1rem;
    margin-bottom: 4px;
}

.wp-pending-meta,
.wp-pending-contact {
    font-size: 0.82rem;
    color: var(--muted);
    margin-bottom: 4px;
}

.wp-pending-summary {
    font-size: 0.85rem;
    color: var(--text);
    margin-top: 6px;
    white-space: pre-line;
}

.wp-pending-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
    justify-content: center;
}

.wp-pending-actions .wp-btn {
    padding: 7px 14px;
    font-size: 0.82rem;
    white-space: nowrap;
}
