/* BoardIt – Admin Stylesheet */

/* ── Wrap ─────────────────────────────────────────────────────────────────── */

.boardit-admin-wrap {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    max-width: 1100px;
}

/* ── Title ────────────────────────────────────────────────────────────────── */

.boardit-admin-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.5rem;
    margin-bottom: 24px;
}

.boardit-logo {
    color: #1a73e8;
    font-weight: 800;
}

.boardit-module {
    color: #5f6368;
    font-weight: 400;
}

/* ── Settings table ───────────────────────────────────────────────────────── */

.boardit-settings-table th {
    width: 240px;
    vertical-align: middle;
    padding: 14px 10px 14px 0;
}

.boardit-settings-table td {
    padding: 10px 10px 10px 0;
    vertical-align: middle;
}

/* ── Shortcode info ───────────────────────────────────────────────────────── */

.boardit-shortcode-info {
    margin-top: 32px;
    padding: 20px;
    background: #f8f9fc;
    border: 1px solid #e4e8f0;
    border-radius: 8px;
}

.boardit-shortcode-info h2 {
    margin: 0 0 10px 0;
    font-size: 1rem;
    font-weight: 700;
}

/* ── Courts table ─────────────────────────────────────────────────────────── */

.boardit-courts-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
}

.boardit-courts-table th,
.boardit-courts-table td {
    padding: 8px 12px;
    border: 1px solid #e4e8f0;
    text-align: left;
    vertical-align: middle;
}

.boardit-courts-table th {
    background: #f8f9fc;
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #5f6368;
}

/* ── Members table ────────────────────────────────────────────────────────── */

.boardit-members-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
    font-size: 13px;
}

.boardit-members-table th,
.boardit-members-table td {
    padding: 8px 12px;
    border: 1px solid #e4e8f0;
    vertical-align: middle;
}

.boardit-members-table th {
    background: #f8f9fc;
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #5f6368;
}

.boardit-members-table tr.blocked td {
    background: #fff8f8;
    color: #c62828;
}

/* ── Buttons ──────────────────────────────────────────────────────────────── */

.boardit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border: none;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    font-family: inherit;
    white-space: nowrap;
}

.boardit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.boardit-btn--primary {
    background: #1a73e8;
    color: #fff;
}

.boardit-btn--primary:hover:not(:disabled) {
    background: #1557b0;
}

.boardit-btn--danger {
    background: #d93025;
    color: #fff;
}

.boardit-btn--danger:hover:not(:disabled) {
    background: #b3271d;
}

.boardit-btn--secondary {
    background: #f1f3f4;
    color: #3c4043;
}

.boardit-btn--secondary:hover:not(:disabled) {
    background: #e2e4e8;
}

/* ── Feedback messages ────────────────────────────────────────────────────── */

.boardit-feedback {
    margin: 8px 0;
    font-size: 13px;
    font-weight: 500;
    min-height: 18px;
}

.boardit-feedback.success { color: #2e7d32; }
.boardit-feedback.error   { color: #c62828; }

/* ── Reservations page ────────────────────────────────────────────────────── */

.boardit-res-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin-top: 16px;
}

.boardit-res-table th,
.boardit-res-table td {
    padding: 8px 12px;
    border: 1px solid #e4e8f0;
    text-align: left;
    vertical-align: middle;
}

.boardit-res-table th {
    background: #f8f9fc;
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #5f6368;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */

@media (max-width: 782px) {
    .boardit-settings-table th {
        width: auto;
        display: block;
    }
}

/* ── E-mailpagina ─────────────────────────────────────────────────────────── */

.boardit-email-wrap {
    max-width: 900px;
}

.boardit-email-section {
    background: #fff;
    border: 1px solid #e4e8f0;
    border-radius: 8px;
    padding: 20px 24px 24px;
    margin-bottom: 24px;
}

.boardit-email-section h2 {
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 1rem;
    font-weight: 600;
}

.boardit-email-section--placeholders .boardit-placeholder-table {
    margin-top: 12px;
}

.boardit-email-section--placeholders code {
    font-size: 13px;
    background: #f4f5f7;
    padding: 2px 6px;
    border-radius: 4px;
}

.boardit-test-btn {
    margin-left: 6px !important;
}

.boardit-test-result {
    display: inline-block;
    margin-left: 10px;
    font-size: 13px;
    font-style: italic;
}

.boardit-test-ok  { color: #2e7d32; }
.boardit-test-err { color: #c62828; }

/* ── BoardIt Pro: label, voorproefjes en de pagina "BoardIt Pro" ───────────── */
.boardit-pro-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 7px;
    border-radius: 3px;
    background: #f0b429;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.6;
    vertical-align: middle;
}
.boardit-upgrade__notice {
    max-width: 640px;
    padding: 10px 14px;
    background: #fff8e5;
    border-left: 4px solid #f0b429;
    font-size: 14px;
}
.boardit-upgrade__intro {
    max-width: 640px;
    font-size: 14px;
}
.boardit-upgrade__list {
    margin: 16px 0 24px;
}
.boardit-upgrade__list li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 14px;
}
.boardit-upgrade__list .dashicons {
    color: var(--wp-admin-theme-color, #2271b1);
}

/* ── Members table – action icon buttons ──────────────────────────────────── */

.boardit-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    font-size: 12px;
    line-height: 2;
    white-space: nowrap;
    vertical-align: middle;
}

.boardit-action-btn .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    line-height: 1;
    flex-shrink: 0;
}

/* Block button – red tint */
.boardit-action-btn.boardit-btn-block {
    color: #b32d2e;
    border-color: #b32d2e;
}
.boardit-action-btn.boardit-btn-block:hover:not(:disabled) {
    background: #b32d2e;
    border-color: #b32d2e;
    color: #fff;
}

/* Unblock button – green tint */
.boardit-action-btn.boardit-btn-unblock {
    color: #006e1a;
    border-color: #006e1a;
}
.boardit-action-btn.boardit-btn-unblock:hover:not(:disabled) {
    background: #006e1a;
    border-color: #006e1a;
    color: #fff;
}

/* Keep action buttons inline, not stacked */
#boardit-members-table .column-actions {
    white-space: nowrap;
}

#boardit-members-table .boardit-action-btn + .boardit-action-btn {
    margin-left: 4px;
}

/* ── Icon-only override voor action-knoppen ───────────────────────────────── */

.boardit-action-btn {
    padding: 4px 6px !important;
    line-height: 1 !important;
    min-width: 0 !important;
}

.boardit-action-btn .dashicons {
    font-size: 16px !important;
    width: 16px !important;
    height: 16px !important;
    line-height: 1.1 !important;
    display: block;
}

.boardit-action-btn .boardit-btn-label {
    display: none;
}

/* ── Acties-knop: geen omlijning, puur icoon ──────────────────────────────── */

.boardit-action-btn.button {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    padding: 2px 4px !important;
    min-height: 0 !important;
    height: auto !important;
    line-height: 1 !important;
}

.boardit-action-btn.button:focus {
    outline: 2px solid #2271b1;
    outline-offset: 2px;
    box-shadow: none !important;
}

.boardit-action-btn .dashicons {
    font-size: 18px !important;
    width: 18px !important;
    height: 18px !important;
    line-height: 1 !important;
    display: block;
    vertical-align: middle;
}

.boardit-action-btn.boardit-btn-block .dashicons   { color: #b32d2e; }
.boardit-action-btn.boardit-btn-unblock .dashicons { color: #006e1a; }

.boardit-action-btn.boardit-btn-block:hover .dashicons   { color: #8a1c1c; }
.boardit-action-btn.boardit-btn-unblock:hover .dashicons { color: #004d10; }

/* ── Gevaarknop (outline-variant) ────────────────────────────────────────── */

.boardit-btn-danger-outline {
    color: #b32d2e !important;
    border-color: #b32d2e !important;
}

.boardit-btn-danger-outline:hover {
    background: #b32d2e !important;
    color: #fff !important;
}

/* ── Versie-badge & admin-footer ─────────────────────────────────────────── */

.boardit-version-badge {
    display: inline-block;
    margin-left: 10px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 400;
    color: #6b7280;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    vertical-align: middle;
    letter-spacing: 0.02em;
}

.boardit-admin-footer-version {
    font-size: 12px;
    color: #8c8f94;
}

/* ── Licentie polling-spinner ─────────────────────────────────────────────── */
.boardit-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: boardit-spin 0.7s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
    opacity: 0.7;
}
@keyframes boardit-spin {
    to { transform: rotate(360deg); }
}

/* ── Drag-and-drop volgorde ─────────────────────────────────────────────── */
.boardit-drag-handle {
    cursor: grab;
}
.boardit-drag-handle:active {
    cursor: grabbing;
}
.boardit-admin-wrap tr.ui-sortable-helper {
    background: #fff !important;
    box-shadow: 0 4px 12px rgba(0,0,0,.15);
    opacity: .95;
}
tr.boardit-sortable-placeholder {
    background: #e5f3ff !important;
    border: 2px dashed #72aee6 !important;
    height: 44px;
    visibility: visible !important;
}

/* Instellingen: kleurkiezers */
.boardit-color-row {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}
.boardit-color-row label,
.boardit-settings-table td > label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
}
.boardit-settings-table input[type="color"] {
    width: 42px;
    height: 32px;
    padding: 2px 3px;
    border: 1px solid #c6cad4;
    border-radius: 4px;
    cursor: pointer;
}
