/* assets/css/calculators/area-calculator.css */

.area-widget-container {
    max-width: 800px;
    margin: 0 auto;
}

.calculator-form {
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    margin-bottom: 2rem;
}

.form-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 15px;
    margin-bottom: 1.5rem;
}

@media (max-width: 600px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.sub-options {
    background-color: #f8fafc;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    margin-bottom: 1.5rem;
    display: none;
}

.sub-options p {
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.radio-label input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-main);
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s;
    background-color: #fff;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.calc-action-btn {
    width: 100%;
    padding: 1.2rem;
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.calc-action-btn:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #4338ca 0%, #3730a3 100%);
}

.result-container {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    padding: 2rem;
    border-radius: 12px;
    margin-top: 2rem;
    text-align: center;
    animation: fadeIn 0.3s ease-in-out;
}

.calc-result-display {
    font-size: 2.5rem;
    font-weight: 800;
    color: #15803d;
    margin: 10px 0;
}

.steps-box {
    background: #fff;
    padding: 1.5rem;
    border-left: 5px solid var(--primary);
    font-family: 'Inter', sans-serif;
    margin-top: 2rem;
    text-align: left;
    color: #334155;
    border-radius: 0 8px 8px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.step-item {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px dashed #e2e8f0;
}

.step-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.step-label {
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    font-size: 0.8rem;
    margin-bottom: 4px;
    display: block;
}

.step-math {
    font-family: 'Courier New', monospace;
    font-size: 1.05rem;
    color: #0f172a;
    background: #f1f5f9;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
}

.diagram-box {
    background-color: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-top: 1.5rem;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.diagram-box h4 {
    color: #64748b;
    font-size: 0.85rem;
    text-transform: uppercase;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

canvas {
    max-width: 100%;
    height: auto;
}

.info-section {
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    margin-top: 3rem;
}

.info-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-main);
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 0.5rem;
}

.info-section p {
    margin-bottom: 1rem;
    line-height: 1.6;
    color: var(--text-muted);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}