/* TI-30XIIS Calculator - Calculator Body & Display */

/* App container for side-by-side layout on wide screens */
.app-container {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 24px;
    min-height: 100%;
    padding: 16px;
}

.calculator {
    display: flex;
    flex-direction: column;
    height: 700px;
    width: 100%;
    max-width: 380px;
    flex-shrink: 0;
    background: linear-gradient(180deg, var(--body-light) 0%, var(--body-color) 30%, var(--body-dark) 100%);
    padding: 8px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Instructions Panel */
.instructions {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px 24px;
    max-width: 320px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    height: 700px;
    overflow-y: auto;
}

.instructions h2 {
    margin: 0 0 16px 0;
    color: var(--body-color);
    font-size: 20px;
    border-bottom: 2px solid var(--body-color);
    padding-bottom: 8px;
}

.instructions h3 {
    margin: 16px 0 8px 0;
    color: #444;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.instructions section:first-of-type h3 {
    margin-top: 0;
}

.instructions ul {
    margin: 0;
    padding-left: 20px;
}

.instructions li {
    margin-bottom: 4px;
}

.instructions strong {
    color: var(--body-color);
    font-weight: 600;
}

/* Hide instructions on narrow screens (mobile/iPad in portrait) */
@media screen and (max-width: 800px) {
    .app-container {
        padding: 0;
        gap: 0;
    }

    .calculator {
        max-width: 100%;
        min-height: 100vh;
        max-height: none;
        border-radius: 0;
    }

    .instructions {
        display: none;
    }
}

/* Display Area */
.display-area {
    background: var(--display-bg);
    border-radius: 8px;
    margin: 12px 8px;
    padding: 8px 12px 12px;
    border: 3px solid var(--display-border);
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Mode Indicators */
.indicators {
    display: flex;
    gap: 12px;
    font-size: 10px;
    font-weight: 600;
    color: var(--display-text);
    margin-bottom: 4px;
    padding: 0 4px;
}

.indicator {
    opacity: 0.2;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.indicator.active {
    opacity: 1;
}

/* Entry Line (top) */
.entry-line {
    font-family: 'Courier New', Courier, monospace;
    font-size: 18px;
    height: 24px;
    line-height: 24px;
    text-align: right;
    color: var(--display-text);
    overflow: hidden;
    white-space: nowrap;
    padding: 0 4px;
}

/* Result Line (bottom) */
.result-line {
    font-family: 'Courier New', Courier, monospace;
    font-size: 32px;
    font-weight: bold;
    height: 40px;
    line-height: 40px;
    text-align: right;
    color: var(--display-text);
    overflow: hidden;
    white-space: nowrap;
    padding: 0 4px;
}

/* Error state */
.result-line.error {
    color: #c62828;
}
