﻿/* =========================================================
   CALCULADORA DE CONCRETO
   Estilos independientes de la página principal
   ========================================================= */
:root {
    --calc-red: #D53C37;
    --calc-gray: #828385;
    --calc-dark: #242526;
    --calc-light: #F5F5F4;
    --calc-white: #FFFFFF;
    --calc-border: #E1E1E1;
    --calc-text: #303030;
    --calc-muted: #737373;
    --calc-radius: 12px;
}

/* =========================================================
   CONFIGURACIÓN GENERAL
   ========================================================= */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--calc-light);
    color: var(--calc-text);
    font-family: Arial, Helvetica, sans-serif;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

button,
a,
input {
    -webkit-tap-highlight-color: transparent;
}

/* =========================================================
   ENCABEZADO
   ========================================================= */

.calculator-header {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 78px;
    padding: 0 6%;
    background: var(--calc-white);
    border-bottom: 1px solid var(--calc-border);
}

.calculator-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--calc-dark);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 2px;
}

.logo-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: var(--calc-red);
    color: var(--calc-white);
    font-size: 19px;
    font-weight: 800;
}

.back-link {
    color: var(--calc-gray);
    font-size: 13px;
    font-weight: 600;
    transition: color 0.25s ease;
}

    .back-link:hover {
        color: var(--calc-red);
    }

/* =========================================================
   CONTENIDO PRINCIPAL
   ========================================================= */

.calculator-main {
    width: min(1440px, 90%);
    margin: 0 auto;
    padding: 70px 0 100px;
}

.calculator-intro {
    max-width: 760px;
    margin-bottom: 60px;
}

.section-label {
    margin: 0 0 18px;
    color: var(--calc-red);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2.5px;
    line-height: 1.5;
}

.calculator-intro h1 {
    margin: 0 0 22px;
    color: var(--calc-dark);
    font-size: clamp(38px, 5vw, 64px);
    font-weight: 800;
    letter-spacing: -2.5px;
    line-height: 1.05;
}

.calculator-intro > p:last-child {
    max-width: 650px;
    margin: 0;
    color: var(--calc-muted);
    font-size: 16px;
    line-height: 1.8;
}

/* =========================================================
   EDITOR DE LA LOSA
   ========================================================= */

.slab-editor {
    padding: 35px;
    background: var(--calc-white);
    border: 1px solid var(--calc-border);
    border-radius: var(--calc-radius);
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.035);
}

.editor-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
    margin-bottom: 30px;
}

    .editor-heading .section-label {
        margin-bottom: 10px;
    }

    .editor-heading h2 {
        margin: 0;
        color: var(--calc-dark);
        font-size: 30px;
        letter-spacing: -1px;
    }

.unit-label {
    padding: 10px 14px;
    background: var(--calc-light);
    border-radius: 6px;
    color: var(--calc-gray);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

/* =========================================================
   DISTRIBUCIÓN DEL EDITOR
   ========================================================= */

.editor-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: 25px;
    align-items: stretch;
}

/* =========================================================
   PANEL DE DIBUJO
   ========================================================= */

.drawing-panel {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--calc-border);
    border-radius: 8px;
}

.panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 20px 22px;
    border-bottom: 1px solid var(--calc-border);
}

    .panel-heading h3,
    .dimensions-panel h3 {
        margin: 0;
        color: var(--calc-dark);
        font-size: 16px;
        font-weight: 700;
    }

    .panel-heading span {
        color: var(--calc-muted);
        font-size: 11px;
    }

.slab-canvas {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 460px;
    padding: 25px;
    overflow: hidden;
    background-color: #FAFAFA;
    background-image: linear-gradient(rgba(130, 131, 133, 0.07) 1px, transparent 1px), linear-gradient(90deg, rgba(130, 131, 133, 0.07) 1px, transparent 1px);
    background-size: 24px 24px;
}

.canvas-placeholder {
    max-width: 250px;
    margin: 0;
    color: var(--calc-muted);
    font-size: 14px;
    line-height: 1.7;
    text-align: center;
}

/* El SVG que agregaremos después */

.slab-canvas svg {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    overflow: visible;
}

/* =========================================================
   PANEL DE DIMENSIONES
   ========================================================= */

.dimensions-panel {
    min-width: 0;
    padding: 25px;
    background: #FAFAFA;
    border: 1px solid var(--calc-border);
    border-radius: 8px;
}

    .dimensions-panel h3 {
        margin-bottom: 10px;
        font-size: 19px;
    }

.panel-description {
    margin: 0 0 28px;
    color: var(--calc-muted);
    font-size: 13px;
    line-height: 1.7;
}

/* =========================================================
   CAMPOS DE MEDIDAS
   ========================================================= */

.dimension-field {
    margin-bottom: 22px;
}

    .dimension-field label {
        display: block;
        margin-bottom: 9px;
        color: var(--calc-text);
        font-size: 12px;
        font-weight: 700;
    }

    .dimension-field input {
        display: block;
        width: 100%;
        min-height: 47px;
        padding: 0 13px;
        background: var(--calc-white);
        border: 1px solid #D8D8D8;
        border-radius: 6px;
        outline: none;
        color: var(--calc-dark);
        font-size: 15px;
        transition: border-color 0.25s ease, box-shadow 0.25s ease;
    }

        .dimension-field input:hover {
            border-color: #B5B5B5;
        }

        .dimension-field input:focus {
            border-color: var(--calc-red);
            box-shadow: 0 0 0 3px rgba(213, 60, 55, 0.10);
        }

/* =========================================================
   RESULTADOS
   ========================================================= */

.results-panel {
    margin-top: 32px;
    padding-top: 25px;
    border-top: 1px solid var(--calc-border);
}

.result-item {
    display: flex;
    flex-direction: column;
    gap: 9px;
    padding: 15px 0;
}

    .result-item + .result-item {
        border-top: 1px solid var(--calc-border);
    }

    .result-item span {
        color: var(--calc-muted);
        font-size: 12px;
        font-weight: 600;
    }

    .result-item strong {
        color: var(--calc-dark);
        font-size: 25px;
        font-weight: 800;
        letter-spacing: -0.8px;
    }

    .result-item:last-child strong {
        color: var(--calc-red);
    }

/* =========================================================
   ADAPTACIÓN A TABLET
   ========================================================= */

@media (max-width: 1050px) {
    .calculator-main {
        width: 92%;
    }

    .slab-editor {
        padding: 25px;
    }

    .editor-layout {
        grid-template-columns: minmax(0, 1fr) 270px;
        gap: 18px;
    }

    .dimensions-panel {
        padding: 20px;
    }

    .slab-canvas {
        min-height: 400px;
        padding: 18px;
    }
}

/* =========================================================
   ADAPTACIÓN A MÓVIL
   ========================================================= */

@media (max-width: 760px) {
    .calculator-header {
        min-height: 68px;
        padding: 0 5%;
    }

    .calculator-logo {
        gap: 9px;
        font-size: 11px;
        letter-spacing: 1.3px;
    }

    .logo-mark {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }

    .back-link {
        font-size: 12px;
    }

    .calculator-main {
        width: 90%;
        padding: 48px 0 65px;
    }

    .calculator-intro {
        margin-bottom: 38px;
    }

        .calculator-intro h1 {
            margin-bottom: 18px;
            font-size: clamp(36px, 10vw, 48px);
            letter-spacing: -1.8px;
        }

        .calculator-intro > p:last-child {
            font-size: 14px;
            line-height: 1.75;
        }

    .section-label {
        font-size: 10px;
        letter-spacing: 2px;
    }

    .slab-editor {
        padding: 20px 15px;
        border-radius: 9px;
    }

    .editor-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 15px;
        margin-bottom: 22px;
    }

        .editor-heading h2 {
            font-size: 25px;
        }

    .unit-label {
        padding: 8px 11px;
        font-size: 11px;
    }

    .editor-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 18px;
    }

    .panel-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 7px;
        padding: 16px;
    }

        .panel-heading span {
            font-size: 11px;
        }

    .slab-canvas {
        min-height: 300px;
        padding: 15px;
        background-size: 20px 20px;
    }

    .dimensions-panel {
        padding: 22px 18px;
    }

        .dimensions-panel h3 {
            font-size: 18px;
        }

    .panel-description {
        margin-bottom: 24px;
    }

    .dimension-field {
        margin-bottom: 19px;
    }

    .results-panel {
        margin-top: 25px;
        padding-top: 18px;
    }

    .result-item strong {
        font-size: 23px;
    }
}

/* =========================================================
   PANTALLAS MUY PEQUEÑAS
   ========================================================= */

@media (max-width: 380px) {
    .calculator-logo {
        font-size: 10px;
        letter-spacing: 0.8px;
    }

    .back-link {
        font-size: 11px;
    }

    .calculator-main {
        width: 92%;
    }

    .slab-editor {
        padding: 17px 12px;
    }

    .slab-canvas {
        min-height: 250px;
    }
}
.slab-canvas svg {
    display: block;
    width: 100%;
    height: auto;
    max-height: 460px;
}

/* =========================================================
   NAVEGACIÓN ENTRE CALCULADORAS
   ========================================================= */

.calculator-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 35px 0 28px;
    padding: 7px;
    width: fit-content;
    max-width: 100%;
    background-color: #F0F0EF;
    border: 1px solid var(--calc-border);
    border-radius: 12px;
}

.calculator-tab {
    appearance: none;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 13px 22px;
    background-color: transparent;
    color: var(--calc-muted);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

    .calculator-tab:hover {
        color: var(--calc-red);
        background-color: rgba(255, 255, 255, 0.65);
    }

    .calculator-tab.active {
        color: var(--calc-red);
        background-color: var(--calc-white);
        border-color: #E8D0CE;
        box-shadow: 0 2px 6px rgba(36, 37, 38, 0.06);
    }

    .calculator-tab:focus-visible {
        outline: 2px solid var(--calc-red);
        outline-offset: 3px;
    }

/* =========================================================
   VISTAS DE LAS CALCULADORAS
   ========================================================= */

.calculator-view {
    width: 100%;
    animation: calculator-view-enter 0.25s ease;
}

    .calculator-view[hidden] {
        display: none !important;
    }

@keyframes calculator-view-enter {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================================
   ENCABEZADOS Y DESCRIPCIONES
   ========================================================= */

.calculator-view .slab-editor {
    margin-top: 0;
}

.calculator-view .panel-description {
    line-height: 1.65;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 600px) {
    .calculator-tabs {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
        gap: 5px;
        margin-top: 25px;
    }

    .calculator-tab {
        width: 100%;
        padding: 13px 16px;
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .calculator-view {
        animation: none;
    }

    .calculator-tab {
        transition: none;
    }
}

/* =========================================================
   EDITOR DE POLÍGONOS
   ========================================================= */

.polygon-editor {
    margin-top: 22px;
}

.polygon-sides-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

    .polygon-sides-heading h4 {
        margin: 0;
        color: var(--calc-dark);
        font-size: 1rem;
        font-weight: 700;
    }

#polygon-side-count {
    padding: 5px 10px;
    border-radius: 20px;
    background: #F0F0EF;
    color: var(--calc-muted);
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

.polygon-sides-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 18px;
}

.polygon-side-row {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) minmax(80px, 110px) 38px;
    align-items: end;
    gap: 9px;
    padding: 12px;
    border: 1px solid var(--calc-border);
    border-radius: 10px;
    background: var(--calc-white);
    transition: border-color 0.2s ease;
}

    .polygon-side-row:focus-within {
        border-color: var(--calc-red);
    }

.polygon-side-number {
    align-self: center;
    color: var(--calc-muted);
    font-size: 0.85rem;
    font-weight: 700;
    text-align: center;
}

.polygon-side-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

    .polygon-side-field label {
        color: var(--calc-muted);
        font-size: 0.78rem;
        font-weight: 600;
    }

    .polygon-side-field select,
    .polygon-side-field input {
        width: 100%;
        min-width: 0;
        height: 42px;
        padding: 0 10px;
        border: 1px solid var(--calc-border);
        border-radius: 7px;
        background: #FFFFFF;
        color: var(--calc-text);
        font-family: inherit;
        font-size: 0.9rem;
    }

        .polygon-side-field select:focus,
        .polygon-side-field input:focus {
            outline: 2px solid rgba(213, 60, 55, 0.15);
            border-color: var(--calc-red);
        }

.remove-side-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 42px;
    border: 1px solid transparent;
    border-radius: 7px;
    background: #F8F0EF;
    color: var(--calc-red);
    font-size: 1.2rem;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

    .remove-side-button:hover {
        background: #F3DEDC;
        border-color: #E8C4C1;
    }

    .remove-side-button:focus-visible,
    .add-side-button:focus-visible {
        outline: 2px solid var(--calc-red);
        outline-offset: 3px;
    }

.add-side-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    min-height: 46px;
    margin-top: 14px;
    padding: 11px 16px;
    border: 1px dashed #D6A6A3;
    border-radius: 9px;
    background: #FFF9F8;
    color: var(--calc-red);
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

    .add-side-button span {
        font-size: 1.3rem;
        line-height: 1;
    }

    .add-side-button:hover {
        background: #FBEDEB;
        border-color: var(--calc-red);
    }

.polygon-message {
    margin: 14px 0 0;
    padding: 11px 13px;
    border-radius: 8px;
    background: #F5F5F4;
    color: var(--calc-muted);
    font-size: 0.84rem;
    line-height: 1.5;
}

    .polygon-message.error {
        background: #FFF0EF;
        color: #A52E29;
    }

    .polygon-message.success {
        background: #EDF7EF;
        color: #28663A;
    }

/* Ajustes para pantallas pequeñas */

@media (max-width: 420px) {
    .polygon-side-row {
        grid-template-columns: 25px minmax(0, 1fr) minmax(70px, 90px) 32px;
        gap: 6px;
        padding: 9px 7px;
    }

    .remove-side-button {
        width: 32px;
    }

    .polygon-side-field select,
    .polygon-side-field input {
        padding: 0 6px;
        font-size: 0.82rem;
    }
}

/* =========================================================
   EDITOR DE POLÍGONOS — DISEÑO TIPO TABLA
   ========================================================= */

.polygon-editor {
    margin-top: 22px;
}

.polygon-sides-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

    .polygon-sides-heading h4 {
        margin: 0;
        color: var(--calc-dark);
        font-size: 1rem;
        font-weight: 700;
    }

#polygon-side-count {
    padding: 5px 10px;
    border-radius: 6px;
    background: #F0F0EF;
    color: var(--calc-muted);
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

.polygon-editor > .panel-description {
    margin-bottom: 14px;
    line-height: 1.5;
}

/* Botón antes de la tabla */

.add-side-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 42px;
    margin: 0 0 14px;
    padding: 10px 14px;
    border: 1px solid var(--calc-red);
    border-radius: 7px;
    background: var(--calc-red);
    color: #FFFFFF;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

    .add-side-button span {
        font-size: 1.2rem;
        line-height: 1;
    }

    .add-side-button:hover {
        background: #B92F2B;
    }

    .add-side-button:focus-visible,
    .remove-side-button:focus-visible {
        outline: 2px solid var(--calc-red);
        outline-offset: 3px;
    }

/* Contenedor de tabla */

.polygon-table-wrapper {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--calc-border);
    border-radius: 8px;
    background: #FFFFFF;
}

/* Encabezados */

.polygon-table-header {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) minmax(95px, 115px) 34px;
    align-items: center;
    gap: 8px;
    min-width: 280px;
    padding: 10px 9px;
    background: #F3F3F2;
    border-bottom: 1px solid var(--calc-border);
    color: var(--calc-muted);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

    .polygon-table-header span:nth-child(3) {
        text-align: center;
    }

/* Lista de filas */

.polygon-sides-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 0;
}

.polygon-side-row {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) minmax(95px, 115px) 34px;
    align-items: center;
    gap: 8px;
    min-width: 280px;
    padding: 7px 9px;
    border: 0;
    border-bottom: 1px solid #ECECEB;
    border-radius: 0;
    background: #FFFFFF;
    transition: background-color 0.15s ease;
}

    .polygon-side-row:last-child {
        border-bottom: 0;
    }

    .polygon-side-row:hover {
        background: #FAFAF9;
    }

.polygon-side-number {
    color: var(--calc-muted);
    font-size: 0.84rem;
    font-weight: 700;
    text-align: center;
}

/* Ocultar etiquetas repetidas: la tabla ya tiene encabezados */

.polygon-side-field {
    display: block;
    min-width: 0;
}

    .polygon-side-field label {
        display: none;
    }

    .polygon-side-field select,
    .polygon-side-field input {
        display: block;
        width: 100%;
        min-width: 0;
        height: 36px;
        padding: 0 7px;
        border: 1px solid #DDDDDA;
        border-radius: 5px;
        background: #FFFFFF;
        color: var(--calc-text);
        font-family: inherit;
        font-size: 0.84rem;
    }

        .polygon-side-field select:focus,
        .polygon-side-field input:focus {
            outline: 2px solid rgba(213, 60, 55, 0.16);
            border-color: var(--calc-red);
        }

/* Botón para eliminar */

.remove-side-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 34px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 5px;
    background: transparent;
    color: var(--calc-muted);
    font-size: 1.25rem;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

    .remove-side-button:hover {
        background: #FBE9E8;
        color: var(--calc-red);
    }

/* Mensajes de validación */

.polygon-message {
    margin: 12px 0 0;
    padding: 10px 12px;
    border-radius: 6px;
    background: #F5F5F4;
    color: var(--calc-muted);
    font-size: 0.82rem;
    line-height: 1.5;
}

    .polygon-message.error {
        background: #FFF0EF;
        color: #A52E29;
    }

    .polygon-message.success {
        background: #EDF7EF;
        color: #28663A;
    }

/* Adaptación a pantallas pequeñas */

@media (max-width: 420px) {
    .polygon-table-header,
    .polygon-side-row {
        grid-template-columns: 25px minmax(0, 1fr) minmax(82px, 95px) 28px;
        gap: 5px;
        padding-right: 6px;
        padding-left: 6px;
    }

    .polygon-side-field select,
    .polygon-side-field input {
        padding: 0 4px;
        font-size: 0.78rem;
    }

    .remove-side-button {
        width: 28px;
    }
}

/* =========================================================
   ORIENTACIÓN Y ETIQUETAS DEL POLÍGONO
   ========================================================= */

/* Flechas centradas en el selector de dirección */
.polygon-side-field select[data-campo="direccion"] {
    text-align: center;
    text-align-last: center;
    font-size: 1.15rem;
    font-weight: 700;
    padding: 0 3px;
    cursor: pointer;
}

/* La vista SVG aprovecha el espacio disponible */
#polygon-canvas svg {
    display: block;
    width: 100%;
    height: auto;
    min-width: 0;
}

/* Evita que las etiquetas de los lados interfieran con el dibujo */
#polygon-canvas {
    overflow: hidden;
}

    /* Transición discreta para los cambios del plano */
    #polygon-canvas svg polygon,
    #polygon-canvas svg polyline {
        transition: fill-opacity 0.2s ease;
    }

@media (max-width: 480px) {
    .polygon-side-field select[data-campo="direccion"] {
        font-size: 1.05rem;
    }
}

/* =========================================================
   LADOS PENDIENTES DE CAPTURA
   ========================================================= */

.polygon-side-row.incomplete {
    background: #FFF6F5;
    box-shadow: inset 3px 0 0 #D53C37;
}

    .polygon-side-row.incomplete:hover {
        background: #FDECEB;
    }

    .polygon-side-row.incomplete .polygon-side-field input {
        border-color: #DDA5A1;
        background: #FFFFFF;
    }

        .polygon-side-row.incomplete .polygon-side-field input:focus {
            border-color: #D53C37;
            outline: 2px solid rgba(213, 60, 55, 0.15);
        }

/* =========================================================
   DIBUJO INTERACTIVO DEL POLÍGONO
   ========================================================= */

.polygon-drawing-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0;
}

    .polygon-drawing-tools button {
        min-height: 42px;
        padding: 10px 14px;
        border: 1px solid #D5D5D5;
        border-radius: 6px;
        background: #FFFFFF;
        color: #333333;
        font: inherit;
        cursor: pointer;
        transition: background-color 0.2s ease, border-color 0.2s ease;
    }

        .polygon-drawing-tools button:hover:not(:disabled) {
            border-color: #D53C37;
            background: #FFF6F5;
        }

        .polygon-drawing-tools button:disabled {
            opacity: 0.45;
            cursor: not-allowed;
        }

#start-polygon-drawing {
    border-color: #D53C37;
    background: #D53C37;
    color: #FFFFFF;
}

    #start-polygon-drawing:hover:not(:disabled) {
        background: #B9322E;
    }

#polygon-drawing-container {
    width: 100%;
    margin: 12px 0 20px;
    overflow: hidden;
    border: 1px solid #D9D9D9;
    border-radius: 8px;
    background: #FFFFFF;
}

    #polygon-drawing-container[hidden] {
        display: none;
    }

#polygon-drawing-canvas {
    display: block;
    width: 100%;
    height: 420px;
    touch-action: manipulation;
    cursor: crosshair;
}

@media (max-width: 600px) {
    .polygon-drawing-tools {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

        .polygon-drawing-tools button {
            width: 100%;
            padding: 10px 6px;
            font-size: 0.9rem;
        }

    #polygon-drawing-canvas {
        height: 320px;
    }
}
#polygon-canvas {
    position: relative;
    width: 100%;
}

#polygon-svg-preview {
    width: 100%;
}

    #polygon-svg-preview svg {
        display: block;
        width: 100%;
        height: auto;
    }

#polygon-drawing-canvas {
    display: block;
    width: 100%;
    height: 460px;
    cursor: crosshair;
    touch-action: manipulation;
}

    #polygon-drawing-canvas[hidden],
    #polygon-svg-preview[hidden] {
        display: none;
    }

@media (max-width: 600px) {
    #polygon-drawing-canvas {
        height: 320px;
    }
}