/* Calculator App Styles - Windows 95 Style */

.calculator-container {
    padding: 8px;
    background: var(--win95-gray);
    font-family: 'MS Sans Serif', sans-serif;
    user-select: none;
}

.calculator-display {
    width: calc(100% - 16px);
    height: 32px;
    background: #000000;
    color: #00ff00;
    font-family: 'Courier New', monospace;
    font-size: 16px;
    font-weight: bold;
    text-align: right;
    padding: 8px;
    margin-bottom: 8px;
    border: var(--border-sunken);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    overflow: hidden;
    white-space: nowrap;
}

.calculator-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(6, 1fr);
    gap: 2px;
    width: 100%;
    height: 240px;
}

.calc-btn {
    height: 32px;
    background: var(--win95-gray);
    border: var(--border-raised);
    font-size: 11px;
    font-family: 'MS Sans Serif', sans-serif;
    font-weight: normal;
    cursor: pointer;
    color: black;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    transition: none;
}

.calc-btn:hover {
    background: var(--win95-light-gray);
}

.calc-btn:active {
    border: var(--border-sunken);
    background: var(--win95-dark-gray);
}

.calc-btn:focus {
    outline: 1px dotted black;
    outline-offset: -3px;
}

/* Special button styles */
.calc-btn[data-action="clear"] {
    grid-column: span 2;
    background: #ff6b6b;
    color: white;
    font-weight: bold;
}

.calc-btn[data-action="clear"]:hover {
    background: #ff5252;
}

.calc-btn[data-action="clear-entry"] {
    background: #ffa726;
    color: white;
    font-weight: bold;
}

.calc-btn[data-action="clear-entry"]:hover {
    background: #ff9800;
}

.calc-btn[data-action="equals"] {
    grid-column: span 3;
    background: #4caf50;
    color: white;
    font-weight: bold;
    font-size: 14px;
}

.calc-btn[data-action="equals"]:hover {
    background: #45a049;
}

.calc-btn[data-action="add"] {
    grid-row: span 2;
    background: #2196f3;
    color: white;
    font-weight: bold;
}

.calc-btn[data-action="add"]:hover {
    background: #1976d2;
}

.calc-btn[data-action="subtract"],
.calc-btn[data-action="multiply"],
.calc-btn[data-action="divide"] {
    background: #2196f3;
    color: white;
    font-weight: bold;
}

.calc-btn[data-action="subtract"]:hover,
.calc-btn[data-action="multiply"]:hover,
.calc-btn[data-action="divide"]:hover {
    background: #1976d2;
}

.calc-btn[data-number="0"] {
    grid-column: span 2;
}

.calc-btn[data-action="decimal"] {
    font-size: 16px;
    font-weight: bold;
}

/* Number buttons */
.calc-btn[data-number] {
    background: var(--win95-gray);
    font-weight: bold;
}

.calc-btn[data-number]:hover {
    background: var(--win95-light-gray);
}

/* Memory buttons */
.calc-btn[data-action^="memory"] {
    background: #9c27b0;
    color: white;
    font-size: 10px;
    font-weight: bold;
}

.calc-btn[data-action^="memory"]:hover {
    background: #7b1fa2;
}

.calc-btn[data-action="backspace"] {
    background: #ff9800;
    color: white;
    font-weight: bold;
}

.calc-btn[data-action="backspace"]:hover {
    background: #f57c00;
}

/* Error state */
.calculator-display.error {
    color: #ff0000;
    animation: blink 0.5s ease-in-out 3;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    25%, 75% { opacity: 0.3; }
}

/* Responsive adjustments */
@media (max-width: 300px) {
    .calc-btn {
        height: 28px;
        font-size: 10px;
    }
    
    .calculator-display {
        font-size: 14px;
        height: 28px;
    }
}