/*
 * Simple Calculator - Styles
 * This file styles the calculator layout and makes it look clean and modern.
 */

/* Outer container for the calculator */
.sc-calculator {
    max-width: 380px;
    margin: 20px auto;
    padding: 20px;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Title at the top */
.sc-calculator-title {
    margin: 0 0 16px;
    font-size: 1.4rem;
    text-align: center;
    color: #111827;
}

/* Each row that holds a label + input */
.sc-calculator-row {
    margin-bottom: 12px;
}

/* Field labels */
.sc-label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.9rem;
    color: #4b5563;
}

/* Number inputs */
.sc-input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    font-size: 1rem;
    box-sizing: border-box;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.sc-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.3);
}

/* Container for the buttons */
.sc-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0;
}

/* Operation buttons */
.sc-btn {
    flex: 1 1 calc(50% - 8px); /* Two buttons per row on larger screens */
    padding: 10px;
    border: none;
    border-radius: 8px;
    background: #2563eb;
    color: #ffffff;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}

.sc-btn:hover {
    background: #1d4ed8;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25);
}

.sc-btn:active {
    transform: translateY(1px);
    box-shadow: none;
}

/* Wrapper for result and error message */
.sc-message-wrapper {
    margin-top: 8px;
}

/* Result box */
.sc-result-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: 8px;
    background-color: #f3f4f6;
    color: #111827;
    font-size: 0.95rem;
}

/* Result label and value */
.sc-result-label {
    font-weight: 600;
    margin-right: 8px;
}

.sc-result-value {
    font-weight: 500;
}

/* Error message (hidden until there is an error) */
.sc-error-message {
    margin: 8px 0 0;
    color: #b91c1c;
    font-size: 0.85rem;
}

/* Make the layout adapt nicely on smaller screens */
@media (max-width: 480px) {
    .sc-calculator {
        margin: 10px;
        padding: 16px;
    }

    .sc-btn {
        flex: 1 1 100%; /* One button per row on small screens */
    }
}