/* tile-calculator.css */
.tile-calculator-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease;
}

.tile-calculator-modal.active {
    visibility: visible;
    opacity: 1;
}

.tile-calculator-modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
}

.tile-calculator-modal__container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    width: 90%;
    max-width: 860px;
    max-height: 85vh;
    overflow-y: auto;
    transition: transform 0.2s ease;
}

.tile-calculator-modal.active .tile-calculator-modal__container {
    transform: translate(-50%, -50%) scale(1);
}

.tile-calculator-modal__close {
    position: absolute;
    top: 12px;
    right: 12px;
    float: right;
    background: unset;
    border: none;
    font-size: 32px;
    cursor: pointer;
    color: #FFF;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
	padding: 0;
    z-index: 10;
    transition: 0.2s;
}

.tile-calculator-modal__close:hover {
    color: #303030;
    transform: scale(1.1);
}

.calculator {
    background: white;
    overflow: hidden;
}

.calculator__header {
    background: #9CAF88;
    color: white;
    padding: 20px 28px;
	text-align: center;
}

.calculator__header h1 {
    margin: 0;
    font-size: 40px;
	color: #FFF;
}

.calculator__header p {
    margin: 6px 0 0;
    opacity: 0.85;
    font-size: 16px;
}

.calculator__form {
    padding: 24px 28px;
}

.calculator__field {
    margin-bottom: 16px;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px;
}

.calculator__field label {
    width: 200px;
    font-weight: 600;
    color: #1f3b2c;
    font-size: 0.9rem;
}

.calculator__field input {
    flex: 1;
    padding: 8px 12px;
    border: 1.5px solid #d0dbd4;
    border-radius: 12px;
    font-size: 0.95rem;
}

.calculator__field input:focus {
    outline: none;
    border-color: #2c5f2d;
	border-radius: 12px;
}

.calculator__checkbox {
    margin: 16px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.calculator__checkbox label {
    font-weight: 600;
    color: #1f3b2c;
}

.calculator__button {
    width: 100%;
    background: #9CAF88;
    color: white;
    border: none;
    padding: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 8px;
    transition: background 0.2s;
}

.calculator__button:active {
    color: white;
}

.calculator__button:hover {
    background: #303030;
	color: #FFF;
}

.calculator__results {
    background: #f8faf6;
    border-top: 2px solid #e2ebe2;
    padding: 20px 28px;
}

.calculator__results h3 {
    margin-top: 0;
    margin-bottom: 16px;
    color: #303030;
}

.calculator__result-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #d4e0d0;
}

.calculator__result-row span:first-child {
    font-weight: 500;
    color: #303030;
}

.calculator__result-row span:last-child {
    font-weight: 700;
    color: #1f3b2c;
    background: #eef3ea;
    padding: 4px 12px;
    border-radius: 30px;
}

.calculator__note {
    font-size: 0.7rem;
    text-align: center;
    margin-top: 14px;
    color: #6a7e68;
}

@media (max-width: 480px) {
    .calculator__field {
        flex-direction: column;
        align-items: stretch;
    }
    .calculator__field label {
        width: auto;
    }
    .calculator__form,
    .calculator__results {
        padding: 18px;
    }
}