/* Door card styles — global (not scoped) so cache-busting via ?v= works reliably, matching
   the app's other global stylesheets. Rendered by Components/DoorCard.razor. */
/* Door card — Linx Design System (LinxBlue), matched to the configurator wizards. */

.dc-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--lxc-surface);
    border: 1px solid var(--lxc-border);
    border-top: 3px solid var(--lxc-border-strong);
    border-radius: var(--lxc-radius-lg);
    box-shadow: var(--lxc-shadow);
    overflow: visible;
    transition: border-color .14s ease, box-shadow .14s ease, transform .14s ease;
    font-family: var(--lxc-font);
    min-width: 0;
}

.dc-card:hover {
    box-shadow: var(--lxc-shadow-hover);
    transform: translateY(-2px);
}

.dc-card--configured { border-top-color: var(--lxc-success); }
.dc-card--partial { border-top-color: var(--lxc-warning); }
.dc-card--empty { border-top-color: var(--lxc-border-strong); }

/* ── Header ── */
.dc-head {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 14px 14px 10px;
}

.dc-tag {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--lxc-blue), var(--lxc-blue-hover));
    color: #fff;
    font-weight: 800;
    font-size: 13px;
    letter-spacing: -.02em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(29, 124, 207, .28);
}

.dc-head-main { flex: 1; min-width: 0; }

.dc-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--lxc-ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dc-type {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 2px;
    font-size: 12px;
    color: var(--lxc-muted);
}

.dc-type-ico { display: inline-flex; }
.dc-type-ico svg { width: 13px; height: 13px; }

.dc-chip {
    flex: 0 0 auto;
    align-self: flex-start;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 100px;
    border: 1px solid transparent;
}

.dc-chip--configured { color: var(--lxc-success); background: var(--lxc-success-bg); }
.dc-chip--partial { color: var(--lxc-warning); background: var(--lxc-warning-bg); }
.dc-chip--empty { color: var(--lxc-muted); background: var(--lxc-panel); }

/* ── Body ── */
.dc-body {
    padding: 0 14px 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1 1 auto;
    min-height: 0;
}

.dc-kv { display: flex; flex-direction: column; }

.dc-kv-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0;
    border-bottom: 1px solid var(--lxc-soft-border);
    font-size: 12.5px;
}

.dc-kv-row:last-child { border-bottom: none; }

.dc-kv-lab {
    color: var(--lxc-muted);
    flex: 0 0 auto;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.dc-kv-val {
    color: var(--lxc-ink);
    font-weight: 600;
    text-align: right;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

/* Price */
.dc-price {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 11px;
    border-radius: var(--lxc-radius);
    background: linear-gradient(180deg, rgba(29, 124, 207, .09), transparent);
    border: 1px solid var(--lxc-soft-border);
}

.dc-price-lab {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--lxc-muted);
}

.dc-price-val {
    font-size: 19px;
    font-weight: 800;
    color: var(--lxc-blue);
    font-variant-numeric: tabular-nums;
}

/* Drawings */
.dc-draw {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 9px 11px;
    border-radius: var(--lxc-radius);
    background: var(--lxc-panel);
}

.dc-draw-status { display: flex; align-items: center; gap: 7px; }

.dc-draw-lab {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--lxc-muted);
}

.dc-draw-state {
    margin-left: auto;
    font-size: 12px;
    font-weight: 600;
    color: var(--lxc-ink);
}

.dc-status-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.dc-status-dot--success { background: var(--lxc-success); }
.dc-status-dot--danger { background: var(--lxc-danger); }
.dc-status-dot--info { background: var(--lxc-info); animation: dc-pulse 1.2s ease-in-out infinite; }
.dc-status-dot--pending { background: var(--lxc-pending); animation: dc-pulse 1.2s ease-in-out infinite; }
.dc-status-dot--muted { background: var(--lxc-muted); }

.dc-downloads { display: flex; flex-wrap: wrap; gap: 6px; }

.dc-dl {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 9px;
    border-radius: var(--lxc-radius-sm);
    background: var(--lxc-surface);
    border: 1px solid var(--lxc-border);
    color: var(--lxc-blue);
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
    transition: border-color .12s, background .12s;
}

.dc-dl:hover { border-color: var(--lxc-blue); background: var(--lxc-success-bg); }
.dc-dl svg { width: 13px; height: 13px; }

/* ── Action toolbar ──
   Pinned to the bottom of the card. Primary buttons stay on one row; the overflow
   "…" control has its own top-right column so it never overlaps them. */
.dc-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 32px;
    align-items: start;
    column-gap: 6px;
    row-gap: 0;
    padding: 10px 12px;
    border-top: 1px solid var(--lxc-soft-border);
    margin-top: auto;
    flex: 0 0 auto;
}

.dc-actions-primary {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.dc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    height: 32px;
    padding: 0 10px;
    border-radius: var(--lxc-radius);
    font-family: var(--lxc-font);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    border: 1px solid var(--lxc-btn-border);
    background: var(--lxc-btn);
    color: var(--lxc-btn-fg);
    transition: background .12s, border-color .12s, color .12s;
    flex: 0 1 auto;
    min-width: 0;
}

.dc-btn:hover:not(:disabled) { background: var(--lxc-btn-hover); border-color: var(--lxc-border-strong); }
.dc-btn:disabled { opacity: .5; cursor: not-allowed; }
.dc-btn svg { width: 14px; height: 14px; flex-shrink: 0; }

.dc-btn--primary { background: var(--lxc-blue); border-color: var(--lxc-blue); color: #fff; }
.dc-btn--primary:hover:not(:disabled) { background: var(--lxc-blue-hover); border-color: var(--lxc-blue-hover); }

.dc-btn--accent {
    background: var(--lxc-success-bg);
    border-color: transparent;
    color: var(--lxc-success);
}
.dc-btn--accent:hover:not(:disabled) { background: var(--lxc-success); color: #fff; }

.dc-btn--icon { width: 32px; padding: 0; justify-content: center; }
.dc-btn--icon svg { width: 16px; height: 16px; }

/* Overflow menu — always top-right of the actions section */
.dc-menu-wrap {
    position: relative;
    justify-self: end;
    align-self: start;
}

.dc-menu {
    position: absolute;
    right: 0;
    bottom: calc(100% + 6px);
    min-width: 176px;
    background: var(--lxc-surface);
    border: 1px solid var(--lxc-border);
    border-radius: var(--lxc-radius);
    box-shadow: var(--lxc-shadow-hover);
    overflow: hidden;
    z-index: 40;
    padding: 4px;
}

.dc-menu button {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    text-align: left;
    padding: 8px 10px;
    border: 0;
    border-radius: var(--lxc-radius-sm);
    background: transparent;
    font-family: var(--lxc-font);
    font-size: 13px;
    color: var(--lxc-ink);
    cursor: pointer;
}

.dc-menu button:hover:not(:disabled) { background: var(--lxc-panel); }
.dc-menu button:disabled { color: var(--lxc-muted); opacity: .5; cursor: default; }
.dc-menu button svg { width: 15px; height: 15px; color: var(--lxc-muted); }
.dc-menu .dc-menu-danger { color: var(--lxc-danger); }
.dc-menu .dc-menu-danger svg { color: var(--lxc-danger); }
.dc-menu-sep { height: 1px; background: var(--lxc-soft-border); margin: 4px 2px; }

/* Spinner for in-progress actions */
.dc-spin {
    width: 13px;
    height: 13px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: dc-spin .7s linear infinite;
    flex-shrink: 0;
}

@keyframes dc-spin { to { transform: rotate(360deg); } }
@keyframes dc-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }

/* Selected door inspector: the original card actions and downloads in Quote workspace layout. */
.ds-door-detail.dc-card { border: 0; border-radius: 0 0 12px 12px; box-shadow: none; background: var(--ds-paper); color: var(--ds-ink); height: auto; }
.ds-door-detail.dc-card:hover { transform: none; box-shadow: none; }
.ds-door-detail .dc-head { padding: 22px 22px 16px; align-items: center; }
.ds-door-detail .dc-tag { background: var(--ds-stage); color: var(--ds-navy); box-shadow: none; width: 36px; height: 36px; }
.ds-door-detail .dc-name { font-size: 18px; font-weight: 600; color: var(--ds-ink); white-space: normal; overflow-wrap: anywhere; }
.ds-door-detail .dc-type { color: var(--ds-muted); }
.ds-door-detail .dc-body { display: grid; grid-template-columns: minmax(0,1fr) minmax(200px,.5fr); gap: 18px 26px; padding: 0 22px 22px; }
.ds-door-detail .dc-kv { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; grid-column: 1; }
.ds-door-detail .dc-kv-row { display: flex; flex-direction: column; padding: 0; gap: 6px; border: 0; }
.ds-door-detail .dc-kv-lab { color: var(--ds-muted); font-size: 11px; text-transform: none; letter-spacing: 0; font-weight: 400; }
.ds-door-detail .dc-kv-val { white-space: normal; text-align: left; overflow-wrap: anywhere; color: var(--ds-ink); font-weight: 500; }
.ds-door-detail .dc-price { grid-column: 1; background: var(--ds-stage); border: 0; }
.ds-door-detail .dc-price-val { color: var(--ds-navy); font-weight: 600; }
.ds-door-detail .dc-draw { grid-column: 2; grid-row: 1 / span 2; border-radius: 0; background: transparent; border-left: 1px solid var(--ds-line); padding: 0 0 0 22px; gap: 10px; }
.ds-door-detail .dc-draw:only-child { grid-column: 1 / -1; border-left: 0; padding: 0; }
.ds-door-detail .dc-draw-status { flex-wrap: wrap; }
.ds-door-detail .dc-draw-lab, .ds-door-detail .dc-draw-state { color: var(--ds-ink); }
.ds-drawing-heading { font-size: 13px; font-weight: 600; color: var(--ds-ink, var(--lxc-ink)); }
.ds-drawing-note, .ds-drawing-error { font-size: 12px; line-height: 1.6; margin: 0; overflow-wrap: anywhere; }
.ds-drawing-note { color: var(--ds-muted, var(--lxc-muted)); }
.ds-drawing-error { color: var(--lxc-danger); }
.ds-file-size { font-weight: 400; opacity: .8; }
.ds-door-detail .dc-dl { min-height: 38px; background: var(--ds-stage); border-color: var(--ds-line); color: var(--ds-navy); padding: 7px 11px; }
.ds-door-detail .dc-actions { padding: 14px 22px; border-top: 1px solid var(--ds-line); grid-template-columns: minmax(0,1fr) 40px; }
.ds-door-detail .dc-actions-primary { flex-wrap: wrap; gap: 8px; }
.ds-door-detail .dc-btn { height: 40px; font-size: 12px; padding: 0 14px; background: var(--ds-paper); color: var(--ds-navy); border-color: var(--ds-line); }
.ds-door-detail .dc-btn--primary { background: var(--ds-navy); color: #fff; border-color: var(--ds-navy); }
.ds-door-detail .dc-btn--accent { background: var(--ds-stage); }
.ds-door-detail .dc-btn--icon { width: 40px; padding: 0; }
.ds-door-detail .dc-menu { background: var(--ds-paper); border-color: var(--ds-line); }
.ds-door-detail .dc-menu button { min-height: 44px; color: var(--ds-ink); }
.ds-door-detail .dc-menu .dc-menu-danger { color: var(--lxc-danger); }
.ds-door-detail .dc-menu button:hover:not(:disabled) { background: var(--ds-stage); }
.theme-dark .ds-door-detail .dc-btn--primary { color: #10253b; }
@media(max-width: 980px) {
    .ds-door-detail .dc-body { grid-template-columns: minmax(0,1fr); }
    .ds-door-detail .dc-draw { grid-column: 1; grid-row: auto; border-left: 0; border-top: 1px solid var(--ds-line); padding: 16px 0 0; }
}
@media(max-width: 700px) {
    .ds-door-detail .dc-head { padding: 18px 16px; flex-wrap: wrap; }
    .ds-door-detail .dc-name { font-size: 16px; }
    .ds-door-detail .dc-body { padding: 0 16px 18px; }
    .ds-door-detail .dc-kv { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px 14px; }
    .ds-door-detail .dc-actions { padding: 14px 16px; }
    .ds-door-detail .dc-btn { min-height: 44px; height: auto; padding: 10px 12px; }
    .ds-door-detail .dc-dl { min-height: 44px; }
}
