/* Net Calc — калькулятор сіток індивідуального розміру */
/* Колір акценту можна перевизначити в темі: :root { --nc-accent: ...; --nc-accent-bg: ...; --nc-accent-ring: ...; } */
:root {
    --nc-accent: #59aa45;
    --nc-accent-bg: #f3f9f1;
    --nc-accent-ring: rgba(89, 170, 69, .3);
}
/* Кнопка «Розрахувати вартість» у картці товару */
.nc-wrap { width: 100%; }
.nc-open.sc-calc-btn {
    display: flex; align-items: center; justify-content: center; gap: 14px;
    width: 100%; min-height: 58px; padding: 8px 16px;
    background: #fff; border: 1.5px solid var(--nc-accent); border-radius: 8px;
    color: #00171f; cursor: pointer; text-align: left;
    transition: background-color .15s, box-shadow .15s;
}
.nc-open.sc-calc-btn:hover { background: var(--nc-accent-bg); }
.nc-open.sc-calc-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--nc-accent-ring); }
.sc-calc-btn-icon { flex: 0 0 auto; display: flex; color: #00171f; }
.sc-calc-btn-text { display: flex; flex-direction: column; line-height: 1.25; }
.sc-calc-btn-title { font-size: 15px; font-weight: 600; }
.sc-calc-btn-sub { font-size: 12px; color: #6b7280; margin-top: 2px; }
.nc-open.nc-loading, .nc-submit.nc-loading { opacity: .6; pointer-events: none; }

body.nc-lock { overflow: hidden; }

.nc-overlay {
    position: fixed; inset: 0; z-index: 100000;
    background: rgba(0, 23, 31, .55);
    display: flex; align-items: flex-start; justify-content: center;
    overflow-y: auto; padding: 32px 16px;
    animation: nc-fade .2s ease;
}
.nc-dialog {
    background: #fff; border-radius: 8px; width: 520px; max-width: 100%;
    margin: auto; box-shadow: 0 20px 50px rgba(0, 0, 0, .25);
    animation: nc-slide .22s ease;
}
.nc-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px; border-bottom: 1px solid #eef0f4;
}
.nc-title { font-size: 18px; font-weight: 600; color: #00171f; }
.nc-close {
    background: none; border: 0; padding: 0; width: 32px; height: 32px;
    font-size: 30px; line-height: 1; color: #6b7280; cursor: pointer;
}
.nc-close:hover { color: #00171f; }

.nc-body { padding: 18px 20px 22px; display: flex; flex-direction: column; }
.nc-label { font-size: 14px; color: #00171f; margin-bottom: 8px; }

.nc-colors { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.nc-color {
    padding: 2px; border: 1px solid #dde1ec; border-radius: 6px; background: #fff;
    cursor: pointer; line-height: 0; transition: border-color .15s, box-shadow .15s;
}
.nc-color img { width: 40px; height: 40px; object-fit: cover; border-radius: 4px; display: block; }
.nc-color:hover { border-color: #9ca3af; }
.nc-color.active { border-color: var(--nc-accent); box-shadow: 0 0 0 1px var(--nc-accent); }

.nc-size { display: flex; align-items: flex-end; gap: 10px; }
.nc-size .nc-field { flex: 1 1 0; min-width: 0; }
.nc-x { font-size: 20px; color: #9ca3af; padding-bottom: 9px; }

.nc-field { display: flex; flex-direction: column; gap: 4px; margin: 0; }
.nc-field > span { font-size: 13px; font-weight: 500; color: #00171f; }
.nc-field input { height: 44px; font-size: 16px; }
.nc-field-wide { margin-top: 12px; }

.nc-hint { font-size: 12px; color: #6b7280; margin-top: 6px; }

.nc-error { display: none; font-size: 13px; color: #e53935; margin-top: 4px; font-weight: 500; }
.nc-error-main { margin: 12px 0 0; }

.nc-summary {
    display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px;
    background: #f5f7fa; border-radius: 6px; padding: 12px 14px; margin: 16px 0 4px;
}
.nc-summary > div { display: flex; flex-direction: column; }
.nc-summary span { font-size: 12px; color: #6b7280; }
.nc-summary b { font-size: 18px; font-weight: 700; color: #00171f; }
.nc-overlay.nc-ready .nc-price { color: var(--nc-accent); }
.nc-summary .nc-perm { grid-column: 1 / -1; font-size: 12px; color: #6b7280; margin-top: 4px; }

.nc-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

.nc-overlay .nc-submit,
.nc-overlay .nc-close-btn {
    display: flex; align-items: center; justify-content: center; width: 100%;
    min-height: 46px; padding: 10px 16px; border: 0; border-radius: 8px;
    background: var(--nc-accent); color: #fff; font-size: 15px; font-weight: 600; line-height: 1.2;
    cursor: pointer; transition: filter .15s;
}
.nc-overlay .nc-submit:hover,
.nc-overlay .nc-close-btn:hover { filter: brightness(.95); }
.nc-overlay .nc-submit { margin-top: 16px; }

.nc-done { align-items: center; text-align: center; padding: 28px 20px; }
.nc-done-icon {
    width: 56px; height: 56px; border-radius: 50%; background: var(--nc-accent); color: #fff;
    font-size: 30px; line-height: 56px; margin-bottom: 14px;
}
.nc-done-text { font-size: 15px; color: #00171f; margin-bottom: 18px; }

@keyframes nc-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes nc-slide { from { opacity: 0; transform: translateY(-16px); } to { opacity: 1; transform: none; } }

@media (max-width: 575px) {
    .nc-overlay { padding: 12px; align-items: center; }
    .nc-head { padding: 14px 16px; }
    .nc-body { padding: 16px; }
    .nc-title { font-size: 16px; }
}
