


/* Calculator input wrapper */
.calculator-wrapper {
    position: relative;
    display: flex;
    width: 100%;
}

/* Calculator icon */
.calculator-open-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;

    border: none;
    background: transparent;
    color: #6c757d;

    width: 32px;
    height: 32px;

    cursor: pointer;
    font-size: 18px;
}

.calculator-open-btn:hover {
    color: #198754;
}

/* Give textbox space for icon */
.calculator-wrapper .calculator-input {
    padding-right: 40px;
}


/* ========================= */
/* Calculator popup */
/* ========================= */

.reusable-calculator {
    display: none;

    position: fixed;
    z-index: 999999;

    width: 280px;

    background: #fff;

    border: 1px solid #ddd;
    border-radius: 10px;

    padding: 12px;

    box-shadow: 0 8px 30px rgba(0,0,0,0.25);
}

.reusable-calculator.show {
    display: block;
}


/* Calculator header */

.calculator-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 8px;

    font-weight: 600;
}

.calculator-close {
    border: none;
    background: transparent;

    font-size: 22px;
    line-height: 20px;

    cursor: pointer;
}


/* Display */

.calculator-display {
    width: 100%;
    height: 45px;

    box-sizing: border-box;

    margin-bottom: 10px;

    border: 1px solid #ced4da;
    border-radius: 6px;

    padding: 5px 10px;

    text-align: right;

    font-size: 20px;

    background: #f8f9fa;
}


/* Buttons */

.calculator-buttons {
    display: grid;

    grid-template-columns: repeat(4, 1fr);

    gap: 6px;
}

.calculator-buttons button {

    height: 42px;

    border: 1px solid #ddd;
    border-radius: 6px;

    background: #f8f9fa;

    font-size: 16px;

    cursor: pointer;
}

.calculator-buttons button:hover {
    background: #e9ecef;
}

.calculator-buttons .operator {
    font-weight: bold;
    background: #e9ecef;
}

.calculator-buttons .equal {
    background: #198754;
    color: #fff;
    border-color: #198754;
}

.calculator-buttons .clear {
    background: #dc3545;
    color: #fff;
    border-color: #dc3545;
}



