.weight-calculator {
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 24px rgba(20, 73, 140, 0.08);
}

.weight-calculator__title {
    margin-bottom: 28px;
    font-size: 28px;
    color: #14498c;
}

.weight-calculator__section-title {
    display: block;
    margin-bottom: 14px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #2f2f2f;
}

.weight-calculator__form-types {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
    margin-bottom: 28px;
}

.weight-calculator__form-type {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 108px;
    padding: 12px 8px;
    border: 2px solid #e5e7eb;
    background: #f8fafc;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.weight-calculator__form-type:hover,
.weight-calculator__form-type:focus {
    border-color: #14498c;
    background: #f0f6fc;
    outline: none;
}

.weight-calculator__form-type.is-active {
    border-color: #14498c;
    background: #e8f1fa;
    box-shadow: inset 0 0 0 1px #14498c;
}

.weight-calculator__form-type-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 40px;
}

.weight-calculator__form-type-icon img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.weight-calculator__form-type-label {
    font-size: 11px;
    font-weight: 600;
    line-height: 1.3;
    text-align: center;
    color: #2f2f2f;
}

.weight-calculator__form-select {
    display: none;
}

.weight-calculator__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.weight-calculator__dimensions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.weight-calculator__field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.weight-calculator__field label {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

.weight-calculator__field input,
.weight-calculator__field select {
    width: 100%;
    height: 44px;
    padding: 0 12px;
    font-size: 15px;
    color: #212529;
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: 0;
    appearance: none;
}

.weight-calculator__field select {
    padding-right: 2.25rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2314498c' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
}

.weight-calculator__field input:focus,
.weight-calculator__field select:focus {
    border-color: #14498c;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(20, 73, 140, 0.15);
}

.weight-calculator__density {
    margin-bottom: 20px;
    padding: 10px 14px;
    font-size: 13px;
    color: #4b5563;
    background: #f3f4f6;
    border-left: 3px solid #14498c;
}

.weight-calculator__result-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: end;
    margin-bottom: 24px;
}

.weight-calculator__result {
    min-height: 44px;
    padding: 10px 14px;
    font-size: 18px;
    font-weight: 700;
    color: #14498c;
    background: #f0f6fc;
    border: 1px solid #c5d9ed;
}

.weight-calculator__submit {
    display: inline-block;
}

@media (max-width: 767px) {
    .weight-calculator {
        padding: 20px 16px;
    }

    .weight-calculator__grid,
    .weight-calculator__dimensions,
    .weight-calculator__result-row {
        grid-template-columns: 1fr;
    }

    .weight-calculator__form-types {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .weight-calculator__form-types {
        grid-template-columns: repeat(3, 1fr);
    }
}
