/* Calculator Styles - Shared across all calculator pages */

body {
    background: linear-gradient(135deg, #4338ca, #3b82f6);
    min-height: 100vh;
    color: white;
}

.calculator-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

@media (min-width: 768px) {
    .calculator-container {
        grid-template-columns: 1fr 1fr;
    }
}

.form-section, .results-section {
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
}

.form-section h2, .results-section h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
    font-weight: 500;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: white;
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    opacity: 0.7;
    font-size: 0.8rem;
    color: #d1d5db; /* text-gray-300 equivalent */
}

.form-control {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 4px;
    background: rgba(0,0,0,0.1);
    color: white;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    border-color: #3b82f6; /* border-blue-500 equivalent */
    box-shadow: 0 0 0 1px #3b82f6; /* ring-1 ring-blue-500 equivalent */
    outline: none;
}

.form-select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    background-color: rgba(75, 85, 99, 0.9); /* bg-gray-600 equivalent */
    color: white;
    border: 1px solid rgba(107, 114, 128, 0.8); /* border-gray-500 equivalent */
    border-radius: 0.375rem;
    appearance: auto;
}

.form-select:focus {
    border-color: #3b82f6; /* border-blue-500 equivalent */
    box-shadow: 0 0 0 1px #3b82f6; /* ring-1 ring-blue-500 equivalent */
    outline: none;
}

.form-range {
    width: 100%;
    height: 1.5rem;
    padding: 0;
    background-color: transparent;
    appearance: none;
}

.form-range::-webkit-slider-runnable-track {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    cursor: pointer;
}

.form-range::-moz-range-track {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    cursor: pointer;
}

.form-range::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    background: #3b82f6; /* bg-blue-500 equivalent */
    border-radius: 50%;
    cursor: pointer;
    margin-top: -6px; /* Center the thumb on the track */
}

.form-range::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: #3b82f6; /* bg-blue-500 equivalent */
    border-radius: 50%;
    cursor: pointer;
    margin-top: -6px; /* Center the thumb on the track */
    border: none; /* Remove default border in Firefox */
}

.range-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-primary {
    display: inline-block;
    background-color: #2563eb; /* bg-blue-600 equivalent */
    color: white;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.2s;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    width: 100%;
    margin-top: 1rem;
}

.btn-primary:hover {
    background-color: #1d4ed8; /* bg-blue-700 equivalent */
    transform: scale(1.02);
}

.result-card {
    background: rgba(0,0,0,0.2);
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.result-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(75, 85, 99, 0.4); /* border-gray-600 equivalent */
}

.result-item:last-child {
    border-bottom: none;
}

.result-label {
    color: #d1d5db; /* text-gray-300 equivalent */
}

.result-value {
    font-weight: 500;
    color: white;
}

.notes {
    font-size: 0.9rem;
    opacity: 0.8;
}

.notes h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: white;
}

.notes ul {
    padding-left: 1.5rem;
    margin-top: 0.5rem;
    color: #d1d5db; /* text-gray-300 equivalent */
}

.warning {
    color: #f59e0b; /* amber-500 */
}

.danger {
    color: #ef4444; /* red-500 */
}

.progress-container {
    flex-grow: 1;
    margin: 0 0.5rem;
}

.progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 0.25rem;
    margin-bottom: 0.25rem;
    position: relative;
}

.progress-text {
    font-family: monospace;
    font-size: 0.9rem;
}

.radio-group {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.radio-label input {
    margin-right: 0.5rem;
}

.header {
    margin-bottom: 2rem;
}

.header a {
    color: #3b82f6; /* text-blue-400 equivalent */
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    font-weight: 500;
}

.header a:hover {
    color: #60a5fa; /* text-blue-300 equivalent */
}

h1 {
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #fbbf24; /* text-yellow-400 equivalent */
    text-align: center;
}

p.lead {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    text-align: center;
    color: #d1d5db; /* text-gray-300 equivalent */
}

/* Audited AA contrast: opaque panels avoid ambiguous gradient blending. */
.form-section,.results-section,.cfm-reference{background:#1e3253!important;color:#f8fafc}
.form-group small,.notes p,.notes li,.notes strong{opacity:1!important;color:#f1f5f9!important}
.btn-small,.btn-secondary{background:#0f766e;color:#fff}
.dark .text-primary{color:#5eead4}
@media print{.form-section,.results-section,.cfm-reference{background:#fff!important;color:#111827!important}.form-section *,.results-section *,.cfm-reference *{color:#111827!important}.form-control,.result-card,.cfm-example,.cfm-reference code{background:#fff!important}.cfm-reference table{table-layout:fixed;width:100%}.cfm-reference th,.cfm-reference td{overflow-wrap:anywhere;color:#111827!important}}

/* The real PDF review caught low-contrast important rules and missing bar layout. */
.stock-visualization{display:flex;min-height:2.5rem;width:100%;margin:.4rem 0;border:1px solid #cbd5e1}
.stock-visualization .segment{display:flex;align-items:center;justify-content:center;min-width:0;overflow:hidden;white-space:nowrap;color:white;border-right:1px solid white}
.segment-piece{background:#0f766e}.segment-waste{background:#475569}.stock-sequence{overflow-wrap:anywhere;font-size:.9rem;margin:.3rem 0 1rem}
@media print{
html,body,body main{background:#fff!important;color:#111827!important}
body main h1,body main .lead,body main .header,body main .header a{color:#111827!important}
.calculator-container{display:block}
.calculator-container .form-section,.calculator-container .results-section{margin-bottom:1rem;break-inside:auto}
.calculator-container .notes,.calculator-container .notes *,.calculator-container .form-group small{color:#111827!important;opacity:1!important}
.stock-visualization .segment{color:#111827!important;background:#e2e8f0!important;border:1px solid #475569}.stock-sequence{color:#111827!important}
.cfm-reference h2,.cfm-reference h3,.cfm-reference h4{break-after:avoid}
.piece-row,.form-group,.result-item,.stock-piece{break-inside:avoid}
body main{padding:1rem!important}.calculator-container .form-section,.calculator-container .results-section{padding:.75rem!important;margin-bottom:.75rem!important}.form-group{margin-bottom:.5rem!important}
footer{font-size:9pt!important;padding:.5rem!important;margin:0!important;break-inside:avoid}
}
