/* Cherry Vintage Chandelier Size Guide 3.7: horizontal calculator. */
.cvsg-wrapper,
.cvsg-wrapper *,
.cvsg-wrapper *::before,
.cvsg-wrapper *::after {
    box-sizing: border-box;
}

.cvsg-wrapper {
    width: 100%;
    margin: 0 auto;
    padding: 32px 20px;
    font-family: "Helvetica", sans-serif;
    color: #000;
    background: transparent;
    line-height: 1.6;
}

.cvsg-calculator-section {
    width: 100%;
    margin: 0;
}

.cvsg-card {
    width: 100%;
    margin: 0;
    padding: clamp(20px, 2.5vw, 40px);
    background: transparent;
    border: 1px solid #735346;
    border-radius: 0;
}

.cvsg-card h3 {
    margin: 0 0 24px;
    padding: 0 0 14px;
    border-bottom: 1px solid #735346;
    font-family: "Libre Baskerville", serif;
    font-size: clamp(1.5rem, 2.2vw, 2.3rem);
    font-weight: 400;
    line-height: 1.3;
    color: #000;
}

.cvsg-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 26px;
    margin: 0 0 26px;
    border-bottom: 1px solid #735346;
}

.cvsg-tab-btn {
    display: inline-block;
    width: auto;
    margin: 0;
    padding: 10px 4px;
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #735346;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
}

.cvsg-tab-btn:hover,
.cvsg-tab-btn.active {
    background: transparent;
    color: #000;
    border-bottom-color: #735346;
}

.cvsg-tab-btn:focus-visible {
    outline: 2px solid #735346;
    outline-offset: 3px;
}

.cvsg-tab-pane { display: none; }
.cvsg-tab-pane.active { display: block; }

/* Both measurements and the result share one horizontal row on desktop. */
.cvsg-calculator-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.15fr);
    gap: 24px 32px;
    align-items: center;
    margin: 0;
}

.cvsg-calculator-form-height {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
}

.cvsg-form-group {
    min-width: 0;
    margin: 0;
}

.cvsg-form-group label {
    display: block;
    margin: 0 0 10px;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.4;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cvsg-form-group input {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: auto;
    margin: 0;
    padding: 14px 16px;
    border: 1px solid #a69c96;
    border-radius: 4px;
    background: #fff;
    color: #000;
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.5;
}

.cvsg-form-group input:focus {
    outline: 2px solid #735346;
    outline-offset: 2px;
    border-color: #735346;
}

.cvsg-hint {
    margin-top: 7px;
    color: #735346;
    font-size: 0.8rem;
    line-height: 1.5;
    font-style: italic;
}

.cvsg-result {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    min-height: 154px;
    margin: 0;
    padding: 20px 16px;
    border: 1px solid #735346;
    background: transparent;
    color: #735346;
    text-align: center;
}

.cvsg-result h4 {
    margin: 0 0 8px;
    padding: 0;
    border: 0;
    color: #735346;
    font-family: "Libre Baskerville", serif;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.4;
    text-transform: none;
    letter-spacing: 1px;
}

.cvsg-result-value {
    margin: 0 0 4px;
    color: #735346;
    font-family: "Libre Baskerville", serif;
    font-size: 2.6rem;
    font-weight: 400;
    line-height: 1.2;
}

.cvsg-result-unit {
    color: #735346;
    font-size: 0.85rem;
    line-height: 1.4;
}

.cvsg-info {
    grid-column: 1 / -1;
    margin: 0;
    padding: 10px 16px;
    border-left: 2px solid #735346;
    background: transparent;
    font-size: 0.88rem;
    line-height: 1.6;
}

@media (min-width: 600px) and (max-width: 999px) {
    .cvsg-calculator-form {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 20px;
    }
    .cvsg-calculator-form:not(.cvsg-calculator-form-height) .cvsg-result {
        grid-column: 1 / -1;
    }
}

@media (max-width: 599px) {
    .cvsg-card { padding: 20px 16px; }
    .cvsg-tabs { gap: 8px 14px; margin-bottom: 22px; }
    .cvsg-tab-btn { font-size: 0.73rem; letter-spacing: 0.6px; }
    .cvsg-calculator-form,
    .cvsg-calculator-form-height {
        grid-template-columns: minmax(0, 1fr);
        gap: 22px;
    }
    .cvsg-card h3 { font-size: 1.55rem; }
    .cvsg-result { min-height: 140px; }
}
