/* Board Foot Calculator Specific Styles */

/* Form elements */
.input-group {
    margin-bottom: 16px;
}

label {
    display: block;
    font-size: 16px;
    font-weight: 500;
    color: #333;
    margin-bottom: 6px;
}

/* Input and Select Styling */
input[type="number"],
select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    background-color: white;
    transition: all 0.2s;
}

input[type="number"]:hover,
select:hover {
    border-color: #003049;
    box-shadow: 0 0 0 3px rgba(0, 48, 73, 0.1);
}

input[type="number"]:focus,
select:focus {
    outline: none;
    border-color: #003049;
    box-shadow: 0 0 0 3px rgba(0, 48, 73, 0.1);
}

/* Length input with unit selector */
.length-input-group {
    display: flex;
    gap: 8px;
}

.length-input-group input {
    flex: 1;
    min-width: 0;
}

.length-input-group .unit-select {
    width: auto;
    min-width: 80px;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M2.5 4.5L6 8L9.5 4.5' stroke='%23003049' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
    cursor: pointer;
}

/* Preset buttons for common lumber sizes */
.preset-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.preset-btn {
    padding: 8px 16px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    transition: all 0.2s;
}

.preset-btn:hover {
    background: #e8e8e8;
    border-color: #003049;
}

.preset-btn:active,
.preset-btn.active {
    background: #003049;
    border-color: #003049;
    color: #fff;
}

/* Grid layouts */
.calculator-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Results section */
.results {
    background: linear-gradient(to bottom right, #f0f9ff, #e0f2fe);
    border: 1px solid #bae6fd;
    border-radius: 4px;
    padding: 16px;
    margin-top: 24px;
}

.results h3 {
    color: #003049;
    font-size: 18px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    font-weight: 600;
    border-bottom: 2px solid #bae6fd;
}

.results-section {
    margin-bottom: 12px;
}

.results-section:last-child {
    margin-bottom: 0;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 4px 0;
}

.flex-between span:first-child {
    color: #003049;
    font-size: 16px;
}

.font-medium {
    font-weight: 600;
    color: #003049;
    font-size: 16px;
}

.border-top {
    border-top: 1px solid #bae6fd;
    padding-top: 12px;
    margin-top: 12px;
}

/* Hide number input spinners */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number] {
    -moz-appearance: textfield;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .calculator-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .results {
        padding: 12px;
    }

    .flex-between {
        padding: 8px 0;
        gap: 8px;
    }

    .preset-buttons {
        gap: 6px;
    }

    .preset-btn {
        padding: 6px 12px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .length-input-group {
        flex-direction: column;
    }

    .length-input-group .unit-select {
        width: 100%;
    }
}
