/* ========================================
   BCSkjár admin (scope-að undir .bcskjar-admin)
   Sama útlit og Mælaborð SSO (.sso-admin) og breytur úr admin.css.
   ======================================== */

@font-face {
    font-family: "Inter";
    font-weight: 100 900;
    font-display: swap;
    src: url("/display/fonts/inter-latin-wght.woff2") format("woff2");
}

@font-face {
    font-family: "Roboto Condensed";
    font-weight: 100 900;
    font-display: swap;
    src: url("/display/fonts/roboto-condensed-latin-wght.woff2") format("woff2");
}

.bcskjar-admin .bk-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px 22px;
    margin-bottom: 20px;
}

.bcskjar-admin .bk-card h2 { font-size: 1.1rem; margin: 0 0 14px; color: var(--dark); }
.bcskjar-admin .bk-card h3 { font-size: 0.95rem; margin: 18px 0 8px; color: var(--gray-700); }

.bcskjar-admin .bk-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.bcskjar-admin .bk-toolbar .spacer { flex: 1; }

.bcskjar-admin .bk-hint { font-size: 0.82rem; color: var(--gray-500); margin: 0 0 12px; }
.bcskjar-admin .bk-hint.warn { color: var(--warning); }

.bcskjar-admin .bk-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: none;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    background: var(--gray-100);
    color: var(--gray-700);
    transition: background .15s;
}

.bcskjar-admin .bk-btn:hover:not(:disabled) { background: var(--gray-200); }
.bcskjar-admin .bk-btn:disabled { opacity: .55; cursor: default; }
.bcskjar-admin .bk-btn svg { width: 16px; height: 16px; flex: 0 0 auto; }
.bcskjar-admin .bk-btn.primary { background: var(--primary); color: #fff; }
.bcskjar-admin .bk-btn.primary:hover:not(:disabled) { background: var(--primary-dark); }
.bcskjar-admin .bk-btn.danger { background: var(--error-bg); color: var(--error); }
.bcskjar-admin .bk-btn.danger:hover:not(:disabled) { background: #fecaca; }
.bcskjar-admin .bk-btn.small { padding: 5px 9px; font-size: 0.8rem; }
.bcskjar-admin .bk-btn.icon { padding: 6px; }

.bcskjar-admin .bk-actions { display: flex; gap: 6px; flex-wrap: wrap; }

.bcskjar-admin .bk-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--gray-200); margin-bottom: 18px; }
.bcskjar-admin .bk-tab {
    padding: 9px 16px;
    border: none;
    background: none;
    border-bottom: 2px solid transparent;
    color: var(--gray-500);
    font-weight: 500;
    cursor: pointer;
}
.bcskjar-admin .bk-tab.active { color: var(--primary); border-bottom-color: var(--primary); }

.bcskjar-admin .bk-state { display: inline-flex; align-items: center; gap: 6px; font-size: 0.82rem; font-weight: 600; }
.bcskjar-admin .bk-state::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--gray-300); }
.bcskjar-admin .bk-state.online { color: var(--success); }
.bcskjar-admin .bk-state.online::before { background: var(--success); }
.bcskjar-admin .bk-state.offline { color: var(--error); }
.bcskjar-admin .bk-state.offline::before { background: var(--error); }
.bcskjar-admin .bk-state.never { color: var(--gray-500); }
.bcskjar-admin .bk-state.on { color: var(--success); }
.bcskjar-admin .bk-state.on::before { background: var(--success); }
.bcskjar-admin .bk-state.off { color: var(--gray-500); }

.bcskjar-admin .bk-muted { color: var(--gray-500); font-size: 0.82rem; }
.bcskjar-admin .bk-code { font-family: 'JetBrains Mono', Consolas, monospace; font-size: 0.85rem; }

.bcskjar-admin .bk-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px 16px; }
.bcskjar-admin .bk-form .full { grid-column: 1 / -1; }
.bcskjar-admin .bk-field label { display: block; font-size: 0.8rem; color: var(--gray-500); margin-bottom: 4px; }
.bcskjar-admin .bk-field input[type=text],
.bcskjar-admin .bk-field input[type=number],
.bcskjar-admin .bk-field select,
.bcskjar-admin .bk-field textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: inherit;
    background: #fff;
}
.bcskjar-admin .bk-field input[type=color] { width: 100%; height: 36px; border: 1px solid var(--gray-300); border-radius: 8px; padding: 2px; background: #fff; }
.bcskjar-admin .bk-check { display: flex; align-items: center; gap: 8px; font-size: 0.88rem; color: var(--gray-700); }

.bcskjar-admin .bk-copy { display: flex; gap: 8px; }
.bcskjar-admin .bk-copy input, .bcskjar-admin .bk-copy textarea {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    background: var(--gray-50);
    font-family: 'JetBrains Mono', Consolas, monospace;
    font-size: 0.82rem;
}

.bcskjar-admin .bk-secret {
    border: 1px solid var(--warning);
    background: var(--warning-bg);
    border-radius: var(--radius);
    padding: 14px 16px;
    margin-bottom: 16px;
}
.bcskjar-admin .bk-secret strong { color: var(--warning); }

.bcskjar-admin .bk-steps { margin: 0; padding-left: 20px; font-size: 0.88rem; color: var(--gray-700); line-height: 1.7; }

/* Modal: breiðari en sjálfgefna .modal */
.bcskjar-admin .modal.wide { max-width: 760px; }
.bcskjar-admin .modal.xwide { max-width: 1100px; }

/* Forskoðun skjás í 16:9 ramma */
.bk-preview-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}
.bk-preview-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Sniðmátsritill ---------- */

.bcskjar-admin .bk-editor { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
@media (max-width: 1200px) { .bcskjar-admin .bk-editor { grid-template-columns: 1fr; } }

.bk-canvas-wrap {
    position: relative;
    width: 100%;
    background: repeating-conic-gradient(#e5e7eb 0% 25%, #f8fafc 0% 50%) 50% / 20px 20px;
    border-radius: 8px;
    overflow: hidden;
}

.bk-canvas-stage {
    position: absolute;
    left: 0;
    top: 0;
    transform-origin: 0 0;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    overflow: hidden;
    font-family: "Inter", sans-serif;
}

.bk-zone {
    position: absolute;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    white-space: nowrap;
    outline: 2px dashed rgba(45, 212, 191, .85);
    outline-offset: -2px;
    cursor: move;
    user-select: none;
}
.bk-zone.selected { outline: 3px solid #f59e0b; z-index: 2; }
.bk-zone.v-top { justify-content: flex-start; }
.bk-zone.v-middle { justify-content: center; }
.bk-zone.v-bottom { justify-content: flex-end; }
.bk-zone .fit { width: 100%; pointer-events: none; }
.bk-zone.t-MultiLine .fit { white-space: pre-line; overflow-wrap: break-word; }
.bk-zone.t-Price .fit { display: flex; align-items: baseline; gap: .6em; }
.bk-zone.t-Price .desc { flex: 1 0 auto; }
.bk-zone.t-Price .amount { flex: 0 0 auto; }
.bk-zone.t-OpeningHours .fit { display: grid; grid-template-columns: auto auto; column-gap: 1em; justify-content: start; }
.bk-zone.t-OpeningHours .value { text-align: right; }

.bk-zone .bk-label {
    position: absolute;
    top: 4px;
    left: 4px;
    padding: 2px 8px;
    font: 600 20px/1.3 "Inter", sans-serif;
    color: #042f2e;
    background: rgba(45, 212, 191, .9);
    border-radius: 4px;
    pointer-events: none;
}
.bk-zone.selected .bk-label { background: #f59e0b; color: #1f1300; }

.bk-handle {
    position: absolute;
    width: 22px;
    height: 22px;
    background: #f59e0b;
    border: 3px solid #fff;
    border-radius: 4px;
    display: none;
}
.bk-zone.selected .bk-handle { display: block; }
.bk-handle[data-dir=nw] { left: 0; top: 0; cursor: nwse-resize; }
.bk-handle[data-dir=ne] { right: 0; top: 0; cursor: nesw-resize; }
.bk-handle[data-dir=sw] { left: 0; bottom: 0; cursor: nesw-resize; }
.bk-handle[data-dir=se] { right: 0; bottom: 0; cursor: nwse-resize; }
.bk-handle[data-dir=n] { left: calc(50% - 11px); top: 0; cursor: ns-resize; }
.bk-handle[data-dir=s] { left: calc(50% - 11px); bottom: 0; cursor: ns-resize; }
.bk-handle[data-dir=w] { left: 0; top: calc(50% - 11px); cursor: ew-resize; }
.bk-handle[data-dir=e] { right: 0; top: calc(50% - 11px); cursor: ew-resize; }

.bcskjar-admin .bk-zone-list { list-style: none; margin: 0 0 12px; padding: 0; max-height: 240px; overflow-y: auto; }
.bcskjar-admin .bk-zone-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.86rem;
}
.bcskjar-admin .bk-zone-list li:hover { background: var(--gray-50); }
.bcskjar-admin .bk-zone-list li.selected { background: #fef3c7; }
.bcskjar-admin .bk-zone-list .type { margin-left: auto; color: var(--gray-500); font-size: 0.78rem; }
