/* Scientific Calculator Container */
.sci-calc-container {
    background: #ffffff;
    border: 1px solid #c2d1e2;
    border-radius: 4px;
    padding: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    font-family: Arial, sans-serif;
    user-select: none;
    max-width: 100%;
}

/* Display Screen */
.sci-calc-display-wrap {
    background-color: #0b6697;
    color: #ffffff;
    padding: 8px 12px;
    border-radius: 2px;
    margin-bottom: 12px;
    text-align: right;
    box-sizing: border-box;
}

.sci-calc-formula {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    min-height: 15px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 2px;
}

.sci-calc-current {
    font-size: 1.5rem;
    font-weight: bold;
    word-break: break-all;
    line-height: 1.2;
}

/* Calculator Grid */
.sci-calc-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 4px;
}

/* Buttons */
.sci-calc-btn {
    border: 1px solid #a3c2e0;
    border-radius: 3px;
    background-color: #f1f3f5;
    color: #000000;
    font-size: 0.75rem;
    font-weight: bold;
    padding: 8px 2px;
    text-align: center;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
    min-height: 34px;
}

.sci-calc-btn:hover {
    background-color: #e2e6ea;
    border-color: #82a8d1;
}

.sci-calc-btn:active {
    background-color: #dae0e5;
    transform: scale(0.97);
}

/* Number & Decimal & Zero buttons: light blue-grey tint */
.sci-calc-btn-num {
    background-color: #b0cbe8;
    border-color: #7facd6;
}

.sci-calc-btn-num:hover {
    background-color: #9cbde0;
    border-color: #6593c2;
}

.sci-calc-btn-num:active {
    background-color: #89afd6;
}

/* Equals key: darker blue-grey */
.sci-calc-btn-equals {
    background-color: #8cb4db;
    border-color: #5c8fc2;
}

.sci-calc-btn-equals:hover {
    background-color: #74a3d1;
    border-color: #4079af;
}

/* Radio button wrapper */
.sci-calc-mode-wrap {
    grid-column: span 2;
    border: 1px solid #c2d1e2;
    border-radius: 3px;
    background-color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0 4px;
    font-size: 0.65rem;
    color: #4b5563;
    min-height: 34px;
}

.sci-calc-mode-wrap label {
    display: flex;
    align-items: center;
    gap: 3px;
    cursor: pointer;
    font-weight: 500;
    margin: 0;
}

.sci-calc-mode-wrap input[type="radio"] {
    margin: 0;
    cursor: pointer;
}

/* Responsive adjustment for extra-small viewports */
@media (max-width: 480px) {
    .sci-calc-container {
        padding: 8px;
    }
    .sci-calc-grid {
        gap: 3px;
    }
    .sci-calc-btn {
        font-size: 0.68rem;
        padding: 6px 1px;
        min-height: 30px;
    }
    .sci-calc-mode-wrap {
        font-size: 0.6rem;
        min-height: 30px;
    }
}
