/* =========================
   Plaster Calculator (scoped)
   only inside .cplaster
========================= */

.cplaster,
.cplaster * {
    box-sizing: border-box;
}

.cplaster {
    --m-card: #fff;
    --m-text: #222;
    --m-muted: #6b7280;
    --m-brand: #283b69;
    --m-brand2: #1f2f55;
    --m-border: #e6e8ef;
    --m-shadow: 0 10px 25px rgba(16, 24, 40, .08);
    --m-radius: 16px;

    font-family: Arial, Helvetica, sans-serif;
    color: var(--m-text);
}

.cplaster .mcalc__wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 18px 0 40px;
}

.cplaster .mcalc__titlebar {
    background: linear-gradient(180deg, var(--m-brand), var(--m-brand2));
    color: #fff;
    border-radius: var(--m-radius);
    padding: 16px;
    box-shadow: var(--m-shadow);
    margin-bottom: 14px;
}

.cplaster .mcalc__h1 {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
}

.cplaster .mcalc__p {
    margin: 6px 0 0;
    opacity: .92;
    font-size: 13px;
}

/* GRID */
.cplaster .mcalc__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
        "top top"
        "left right";
    gap: 14px;
    align-items: start;
}

.cplaster .mcalc__grid>.m-topline {
    grid-area: top;
    margin: 0;
    padding: 0 2px 6px;
}

.cplaster .mcalc__grid>.mcalc__card:first-of-type {
    grid-area: left;
}

.cplaster .mcalc__grid>.mcalc__card:last-of-type {
    grid-area: right;
    margin-top: 0;
}

@media (max-width:980px) {
    .cplaster .mcalc__grid {
        grid-template-columns: 1fr;
        grid-template-areas: "top" "left" "right";
    }
}

/* CARDS / TITLES */
.cplaster .mcalc__card {
    background: var(--m-card);
    border: 1px solid var(--m-border);
    border-radius: var(--m-radius);
    box-shadow: var(--m-shadow);
    padding: 14px;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.cplaster .mcalc__sectionTitle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-bottom: 10px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--m-border);
}

.cplaster .mcalc__h2 {
    font-size: 15px;
    margin: 0;
    font-weight: 800;
    color: var(--m-brand2);
}

.cplaster .mcalc__badge {
    font-size: 12px;
    color: #fff;
    background: rgba(40, 59, 105, .9);
    padding: 6px 10px;
    border-radius: 999px;
    white-space: nowrap;
}

/* topline */
.cplaster .m-topline {
    margin: 10px 0 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.cplaster .m-autocalc {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    color: #111827;
    font-size: 14px;
    user-select: none;
    white-space: nowrap;
}

.cplaster .m-autocalc input {
    width: 16px;
    height: 16px;
    accent-color: #283b69;
}

/* FORM */
.cplaster .mcalc__rows {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
}

@media (max-width:680px) {
    .cplaster .mcalc__rows {
        grid-template-columns: 1fr;
    }
}

.cplaster .mcalc__field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.cplaster .m-full {
    grid-column: 1 / -1;
}

.cplaster .mcalc__label {
    font-weight: 900;
    color: #2b3a55;
    font-size: 13px;
}

.cplaster .mcalc__input,
.cplaster .mcalc__select {
    width: 100%;
    height: 44px;
    border: 1px solid #d4d7de;
    border-radius: 12px;
    padding: 0 12px;
    outline: none;
    background: #fff;
    color: #1f2937;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}

.cplaster .mcalc__input::placeholder {
    color: #9ca3af;
    opacity: 1;
}

.cplaster .mcalc__input:focus,
.cplaster .mcalc__select:focus {
    border-color: rgba(40, 59, 105, .55);
    box-shadow: 0 0 0 3px rgba(40, 59, 105, .12);
    color: #111827;
}

.cplaster .mcalc__hint {
    font-size: 12px;
    color: var(--m-muted);
}
/* 3 columns (ratio inputs) */
.cplaster .m-3col {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
}

@media (max-width:680px) {
    .cplaster .m-3col {
        grid-template-columns: 1fr;
    }
}

/* Buttons */
.cplaster .mcalc__actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.cplaster .mcalc__btn {
    height: 44px;
    padding: 0 14px;
    border-radius: 12px;
    border: 1px solid #d4d7de;
    background: #fff;
    cursor: pointer;
    font-weight: 900;
    color: #1f2f55;
    min-width: 160px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .15s ease, border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.cplaster .mcalc__btn:hover {
    background: #f6f7fb;
    border-color: #b9c2da;
    box-shadow: 0 6px 16px rgba(31, 47, 85, .12);
    transform: none;
}

.cplaster .mcalc__btn--primary {
    background: rgba(40, 59, 105, .08);
    border: 1px solid rgba(40, 59, 105, .35);
}

.cplaster .mcalc__btn--primary:hover {
    background: rgba(40, 59, 105, .14);
}

.cplaster .mcalc__btn--small {
    height: 36px;
    min-width: unset;
    padding: 0 12px;
    border-radius: 10px;
    font-size: 13px;
}

.cplaster .m-mt10 {
    margin-top: 10px;
}

/* RESULTS / KPI */
.cplaster .mcalc__bigNumber {
    background: linear-gradient(180deg, #e9f7ef, #f6fbf8);
    border: 1px solid #bfe3cd;
    border-radius: var(--m-radius);
    padding: 12px;
    font-weight: 900;
    font-size: 16px;
    color: #1f513a;
    box-shadow: 0 8px 20px rgba(46, 125, 90, .10);
    min-height: 74px;
    display: flex;
    align-items: center;
}

.cplaster .m-details {
    margin-top: 12px;
    border: 1px solid var(--m-border);
    border-radius: 14px;
    padding: 12px;
    background: #fff;
    color: #374151;
    font-size: 13px;
}

.cplaster .m-details:empty {
    display: none;
}

.cplaster .m-kpis {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

@media (max-width:680px) {
    .cplaster .m-kpis {
        grid-template-columns: 1fr;
    }
}

.cplaster .m-kpi {
    border: 1px solid rgba(40, 59, 105, .10);
    border-radius: 14px;
    padding: 12px;
    background: rgba(40, 59, 105, .04);
}

.cplaster .m-kpi__k {
    font-size: 12px;
    font-weight: 900;
    color: rgba(75, 85, 99, .95);
    margin-bottom: 6px;
}

.cplaster .m-kpi__v {
    font-size: 18px;
    font-weight: 900;
    color: #1f2f55;
    font-variant-numeric: tabular-nums;
}

.cplaster .m-kpi__s {
    margin-top: 6px;
    font-size: 12px;
    color: rgba(75, 85, 99, .92);
}

.cplaster .m-summary {
    margin-top: 10px;
    padding: 12px;
    border-radius: 14px;
    border: 1px solid rgba(40, 59, 105, .12);
    background: rgba(40, 59, 105, .06);
    color: #0b1b3f;
}

.cplaster .m-hintSmall {
    margin-top: 6px;
    font-size: 11px;
    color: rgba(75, 85, 99, .88);
    line-height: 1.45;
}

.cplaster .mcalc__toast {
    margin-top: 10px;
    font-size: 12px;
    color: var(--m-muted);
    min-height: 16px;
}

/* CHART */
.cplaster .m-chart {
    margin-top: 12px;
    border: 1px solid var(--m-border);
    border-radius: 14px;
    background: #fff;
    padding: 12px;
}

.cplaster .m-chart__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.cplaster .m-chart__title {
    font-weight: 900;
    color: #1f2f55;
    font-size: 13px;
}

.cplaster canvas {
    width: 100%;
    height: auto;
    border-radius: 12px;
    border: 1px solid rgba(40, 59, 105, .10);
    background: rgba(40, 59, 105, .02);
}

/* DETAILS / TABLE */
.cplaster .m-schedule {
    margin-top: 12px;
    border: 1px solid var(--m-border);
    border-radius: 14px;
    background: #fff;
    overflow: hidden;
}

.cplaster .m-schedule summary.m-sum {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    font-weight: 900;
    cursor: pointer;
    list-style: none;
    transition: all .18s ease;
    background: linear-gradient(180deg, #fff5f5, #faeaea);
    border-bottom: 1px solid rgba(231, 188, 188, .85);
    color: #6b3a3a;
    margin: 10px 12px 12px;
    border: 1px solid rgba(231, 188, 188, .85);
    border-radius: 14px;
}

.cplaster .m-schedule summary::-webkit-details-marker {
    display: none;
}

.cplaster details[open]>summary.m-sum {
    background: linear-gradient(180deg, #e9f7ef, #dff4e8);
    border: 1px solid #bfe3cd;
    color: #1f513a;
    box-shadow: 0 8px 20px rgba(46, 125, 90, .14);
}

.cplaster .m-tools {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 12px 10px;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.cplaster .m-tablewrap {
    overflow: auto;
    padding: 0 12px 12px;
}

.cplaster .m-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

.cplaster .m-table th,
.cplaster .m-table td {
    text-align: left;
    padding: 10px 10px;
    border-bottom: 1px solid rgba(40, 59, 105, .10);
    font-size: 13px;
    white-space: nowrap;
}

.cplaster .m-table th {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, .95);
    color: var(--m-brand2);
    font-weight: 900;
}

.cplaster .m-table td {
    color: rgba(31, 47, 85, .95);
}

.cplaster .m-sum-left {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.cplaster .muted {
    font-weight: 900;
    color: rgba(75, 85, 99, .85);
    font-size: 12px;
}

.cplaster .m-ico {
    width: 18px;
    height: 18px;
    border-radius: 6px;
    border: 1px solid currentColor;
    background:
        linear-gradient(currentColor, currentColor) 4px 6px/10px 1px no-repeat,
        linear-gradient(currentColor, currentColor) 4px 10px/10px 1px no-repeat,
        linear-gradient(currentColor, currentColor) 4px 14px/10px 1px no-repeat,
        linear-gradient(currentColor, currentColor) 6px 4px/1px 12px no-repeat;
    opacity: .85;
}

.cplaster .m-chevron {
    width: 10px;
    height: 10px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform .2s ease;
}

.cplaster details[open]>summary .m-chevron {
    transform: rotate(-135deg);
}

/* COST GRID */
.cplaster .m-costgrid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
    padding: 0 12px 12px;
}

@media (max-width:680px) {
    .cplaster .m-costgrid {
        grid-template-columns: 1fr;
    }
}

/* Divider + SEO/FAQ */
.cplaster .m-divider {
    width: 100%;
    max-width: 900px;
    margin: 20px auto;
    border-top: 2px dashed rgba(40, 59, 105, .35);
}

.cplaster .m-seo,
.cplaster .m-faq {
    max-width: 900px;
    margin: 20px auto 0;
    padding: 0 16px;
}

.cplaster .m-seo h2,
.cplaster .m-faq h2 {
    font-size: 22px;
    color: #283b69;
    margin-bottom: 14px;
}

.cplaster .m-seo p,
.cplaster .m-seo li {
    margin-bottom: 14px;
    line-height: 1.6;
    font-size: 15px;
    color: #222;
}

.cplaster .m-faq-item {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 14px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .05);
    border: 1px solid rgba(40, 59, 105, .10);
}

.cplaster .m-faq-item h3 {
    font-size: 16px;
    margin: 0 0 6px;
    color: #283b69;
    font-weight: 900;
}

.cplaster .m-faq-item p {
    font-size: 14px;
    color: #444;
    line-height: 1.6;
    margin: 0;
}

@media (max-width:520px) {

    .cplaster .m-seo h2,
    .cplaster .m-faq h2 {
        font-size: 18px;
    }

    .cplaster .m-seo p,
    .cplaster .m-seo li {
        font-size: 14px;
    }

    .cplaster .m-faq-item {
        padding: 14px;
    }
}
/* =========================
   Highlight "Тип штукатурки" switch (mixType)
   soft yellow like Google AI button
========================= */

.cplaster #mixType {
    border-color: rgba(251, 191, 36, .25);
    background: linear-gradient(180deg,
            rgba(255, 253, 247, 1),
            rgba(255, 248, 220, .35));
    box-shadow:
        0 6px 18px rgba(251, 191, 36, .06);
}

/* very gentle hover */
.cplaster #mixType:hover {
    border-color: rgba(251, 191, 36, .35);
    box-shadow:
        0 8px 22px rgba(251, 191, 36, .10);
}

/* soft focus glow */
.cplaster #mixType:focus {
    border-color: rgba(251, 191, 36, .45);
    box-shadow:
        0 0 0 3px rgba(251, 191, 36, .10),
        0 10px 24px rgba(251, 191, 36, .12);
}

/* optional: make label a tiny hint that it's important */
.cplaster label[for="mixType"] {
    color: #8a4b00;
}
/* ===== Bottom links under RESULT (3 green buttons) ===== */
.cplaster .m-navlinks {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.cplaster .m-navlinks a {
    flex: 1;
    height: 44px;

    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;

    padding: 6px 10px;
    border-radius: 12px;

    border: 1px solid #9ad8b1;
    background: linear-gradient(180deg, #e9f7ef, #f6fbf8);
    color: #1f513a;

    font-weight: 900;
    font-size: 13px;
    /* ✅ менший шрифт */
    line-height: 1.15;
    /* ✅ щоб вміщалось */
    text-decoration: none;

    white-space: normal;
    /* ✅ дозволяє 2 рядки */
}

.cplaster .m-navlinks a:hover {
    border-color: #7ecb9b;
    box-shadow: 0 8px 18px rgba(46, 125, 90, .12);
}

@media (max-width:520px) {
    .cplaster .m-navlinks {
        flex-direction: column;
    }
}
