/* Basic Calculator Styles */
.basic-calculator-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    margin: 0 auto;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.basic-calculator-container[data-theme="light"] {
    background: #ffffff;
    color: #333333;
}

.basic-calculator-container[data-theme="dark"] {
    background: #2d3748;
    color: #ffffff;
}

.basic-calculator-container[data-theme="dark"] .calculator {
    background: #4a5568;
}

.basic-calculator-container[data-theme="dark"] .calculator-display input {
    background: #1a202c;
    color: #ffffff;
    border-color: #4a5568;
}

.basic-calculator-container[data-theme="dark"] .calc-btn {
    background: #718096;
    color: #ffffff;
    border-color: #4a5568;
}

.basic-calculator-container[data-theme="dark"] .calc-btn:hover {
    background: #90a0b7;
}

.basic-calculator-container[data-theme="dark"] .btn-operator {
    background: #f6ad55;
}

.basic-calculator-container[data-theme="dark"] .btn-operator:hover {
    background: #fbd38d;
}

.basic-calculator-container[data-theme="dark"] .btn-equals {
    background: #68d391;
}

.basic-calculator-container[data-theme="dark"] .btn-equals:hover {
    background: #9ae6b4;
}

.basic-calculator-container[data-theme="dark"] .btn-clear {
    background: #fc8181;
}

.basic-calculator-container[data-theme="dark"] .btn-clear:hover {
    background: #feb2b2;
}

.calculator {
    padding: 20px;
    background: #f7fafc;
}

.calculator-display {
    margin-bottom: 15px;
}

.calculator-display input {
    width: 100%;
    height: 60px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    text-align: right;
    font-size: 24px;
    font-weight: bold;
    padding: 0 15px;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
}

.calculator-display input:focus {
    outline: none;
    border-color: #4299e1;
}

.calculator-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.calc-btn {
    height: 60px;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
    color: #333;
    border: 2px solid #e2e8f0;
}

.calc-btn:hover {
    background: #f7fafc;
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.calc-btn:active {
    transform: translateY(0);
}

.btn-number {
    background: #ffffff;
}

.btn-operator {
    background: #4299e1;
    color: white;
    border-color: #4299e1;
}

.btn-operator:hover {
    background: #3182ce;
}

.btn-equals {
    background: #48bb78;
    color: white;
    border-color: #48bb78;
}

.btn-equals:hover {
    background: #38a169;
}

.btn-clear {
    background: #f56565;
    color: white;
    border-color: #f56565;
}

.btn-clear:hover {
    background: #e53e3e;
}

.btn-zero {
    grid-column: span 2;
}

.calculator-result {
    padding: 15px 20px;
    background: #edf2f7;
    border-top: 1px solid #e2e8f0;
    text-align: center;
}

.calculator-result .result-text {
    font-weight: bold;
    color: #2d3748;
}

.calculator-result .result-text.error {
    color: #e53e3e;
}

.basic-calculator-container.calculating .calculator-display input {
    background: linear-gradient(90deg, #e2e8f0 25%, #f7fafc 50%, #e2e8f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Responsive Design */
@media (max-width: 480px) {
    .basic-calculator-container {
        margin: 10px;
    }
    
    .calculator {
        padding: 15px;
    }
    
    .calc-btn {
        height: 50px;
        font-size: 16px;
    }
    
    .calculator-display input {
        height: 50px;
        font-size: 20px;
    }
}

@media (max-width: 320px) {
    .calculator {
        padding: 10px;
    }
    
    .calc-btn {
        height: 45px;
        font-size: 14px;
    }
    
    .calculator-buttons {
        gap: 5px;
    }
}

/* Widget specific styles */
.widget_basic_calculator_widget .basic-calculator-container {
    box-shadow: none;
    border: 1px solid #e2e8f0;
}

.widget_basic_calculator_widget .calculator {
    padding: 10px;
}

.widget_basic_calculator_widget .calc-btn {
    height: 45px;
    font-size: 14px;
}

.widget_basic_calculator_widget .calculator-display input {
    height: 45px;
    font-size: 18px;
}