/*
 * Kalkulator wyceny cięcia (shortcode [metalowy_dwg_form]).
 * Wygląd odtworzony z produkcji: ramka wokół formularza, wiersze
 * "etykieta z lewej / pole z prawej", pomarańczowy przycisk akcji.
 * Wartości kolorów są tu zduplikowane celowo - wtyczka ma działać
 * niezależnie od tego, czy aktywny motyw definiuje własne tokeny.
 */

.mv-dwg {
    --mv-dwg-orange: #ffd460;
    --mv-dwg-orange-hover: #ffe9ae;
    --mv-dwg-border: rgba(48, 48, 48, 0.7);
    --mv-dwg-border-light: #e2e2e2;
    font-size: 16px;
    color: #1e1e1e;
}

.mv-dwg__form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    border: 1px solid var(--mv-dwg-border-light);
    border-radius: 12px;
    padding: 32px;
    background: #fff;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
}

.mv-dwg__row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

@media (min-width: 768px) {
    .mv-dwg__row {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
    }

    .mv-dwg__label,
    .mv-dwg__control {
        flex: 1 1 50%;
        min-width: 0;
    }
}

.mv-dwg__label {
    font-size: 18px;
}

.mv-dwg__field {
    position: relative;
    display: flex;
    align-items: center;
    border: 1px solid var(--mv-dwg-border);
    border-radius: 8px;
    padding: 6px 10px;
    background: #fff;
}

.mv-dwg__field input,
.mv-dwg__field select {
    width: 100%;
    border: 0;
    outline: none;
    background: transparent;
    font-size: 16px;
    font-family: inherit;
    color: inherit;
    padding: 2px 0;
}

/* Strzałki spinnera przy polach number - produkcja ich nie pokazuje. */
.mv-dwg__field input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.mv-dwg__field input[type="number"]::-webkit-outer-spin-button,
.mv-dwg__field input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.mv-dwg__hint {
    flex: none;
    width: 20px;
    height: 20px;
    margin-left: 8px;
    border: 1px solid var(--mv-dwg-border);
    border-radius: 50%;
    font-size: 12px;
    font-style: italic;
    line-height: 18px;
    text-align: center;
    color: var(--mv-dwg-border);
    cursor: help;
    user-select: none;
}

.mv-dwg__section {
    margin: 12px 0 0;
    font-size: 18px;
    font-weight: 600;
}

.mv-dwg__actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
}

@media (min-width: 768px) {
    .mv-dwg__actions {
        flex-direction: row;
    }
}

.mv-dwg__btn {
    flex: 1;
    height: 48px;
    padding: 0 24px;
    border: 1px solid #303030;
    border-radius: 8px;
    background: #fff;
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.mv-dwg__btn:hover {
    background: #f3f4f6;
}

.mv-dwg__btn--primary {
    background: var(--mv-dwg-orange);
}

.mv-dwg__btn--primary:hover {
    background: var(--mv-dwg-orange-hover);
}

.mv-dwg__btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.mv-dwg__error {
    margin: 0;
    color: #dc2626;
    font-size: 14px;
    text-align: left;
}

.mv-dwg__error:empty {
    display: none;
}

.mv-dwg__success {
    margin: 8px 0 0;
    color: #16a34a;
    font-size: 15px;
    font-weight: 600;
}

.mv-dwg__success:empty {
    display: none;
}

/* ---------- Wyniki wyceny ---------- */
.mv-dwg__results {
    margin-top: 8px;
    border: 2px solid var(--mv-dwg-border);
    border-radius: 8px;
    background: #f9fafb;
    padding: 20px;
}

.mv-dwg__results-title {
    margin: 0 0 16px;
    font-size: 22px;
    font-weight: 700;
}

.mv-dwg__result-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 5px 0;
    font-size: 17px;
}

.mv-dwg__result-value {
    font-weight: 700;
    white-space: nowrap;
}

.mv-dwg__result-row--total {
    margin-top: 8px;
    padding-top: 14px;
    border-top: 2px solid var(--mv-dwg-border);
    font-size: 19px;
    font-weight: 700;
}

.mv-dwg__result-row--total .mv-dwg__result-value {
    color: #16a34a;
}

/* ---------- Sekcja wysyłki zapytania ---------- */
.mv-dwg__email {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid var(--mv-dwg-border);
}

.mv-dwg__email-title {
    margin: 0 0 12px;
    font-size: 19px;
    font-weight: 600;
}

.mv-dwg__file-label {
    display: block;
    margin-bottom: 8px;
    font-size: 15px;
    font-weight: 600;
}

.mv-dwg__file-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.mv-dwg__file-input {
    display: none;
}

.mv-dwg__btn--file {
    flex: none;
    height: auto;
    padding: 10px 16px;
    font-size: 15px;
}

.mv-dwg__file-status {
    font-size: 15px;
    color: #4b5563;
    overflow-wrap: anywhere;
}

.mv-dwg__send-row {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 12px;
}

@media (min-width: 768px) {
    .mv-dwg__send-row {
        flex-direction: row;
        align-items: center;
    }
}

.mv-dwg__email-input {
    flex: 1;
    height: 44px;
    padding: 0 16px;
    border: 1px solid var(--mv-dwg-border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 16px;
    background: #fff;
    color: inherit;
}

.mv-dwg__send-row .mv-dwg__btn {
    flex: none;
    height: 44px;
    padding: 0 28px;
}
