/* Flyout Calculator CSS */
.flyout-calculator-wrapper {
    position: fixed;
    top: 0;
    right: -400px;
    width: 350px;
    /* height: 100vh; */
    background: rgba(255, 255, 255, 0.95);
    /* backdrop-filter: blur(10px); */
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    transition: right 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
    padding: 20px;
    border-left: 1px solid rgba(0, 0, 0, 0.05);
}

.flyout-calculator-wrapper.active {
    right: 0;
}

.dark-mode .flyout-calculator-wrapper {
    background: rgba(30, 30, 30, 0.95);
    border-left: 1px solid rgba(255, 255, 255, 0.05);
    color: #fff;
}

.flyout-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.flyout-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.close-flyout {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #888;
    transition: color 0.3s;
}

.close-flyout:hover {
    color: var(--primary-color, #FFB600);
}

/* Calculator Styles */
.modern-calc {
    width: 100%;
    background: #fff;
    border-radius: 20px;
    padding: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.dark-mode .modern-calc {
    background: #252525;
}

.calc-display {
    width: 100%;
    margin-bottom: 20px;
}

.calc-history {
    text-align: right;
    height: 20px;
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 5px;
    overflow: hidden;
}

.calc-input {
    width: 100%;
    border: none;
    background: none;
    text-align: right;
    font-size: 2rem;
    font-weight: 600;
    color: #333;
    padding: 0;
    outline: none;
}

.dark-mode .calc-input {
    color: #fff;
}

.calc-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.calc-btn {
    aspect-ratio: 1;
    border: none;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #eaffea;
    color: #3d9b3d;
}

.calc-btn:hover {
    background: #56e356;
    color: #fff;
    transform: translateY(-2px);
}

.calc-btn:active {
    transform: translateY(0);
}

.calc-btn.operator {
    background: rgba(255, 182, 0, 0.1);
    color: var(--primary-color, #FFB600);
    font-weight: 700;
}

.calc-btn.operator:hover {
    background: var(--primary-color, #FFB600);
    color: #fff;
}

.calc-btn.equals {
    background: var(--primary-color, #FFB600);
    color: #fff;
    grid-column: span 2;
    aspect-ratio: auto;
}

.calc-btn.clear {
    color: #ff4d4d;
    background: rgba(255, 77, 77, 0.1);
}

.calc-btn.clear:hover {
    background: #ff4d4d;
    color: #fff;
}

.dark-mode .calc-btn {
    background: #333;
    color: #eee;
}

.dark-mode .calc-btn:hover {
    background: #444;
}

.calc-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 9998;
    display: none;
    /* backdrop-filter: blur(2px); */
}

.calc-overlay.active {
    display: block;
}
