/**
 * Admin Calculator Widget Styles
 * Version: 1.0.0
 */

/* Floating Toggle Button */
.wp-calc-toggle-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 56px;
    height: 56px;
    background: #2271b1;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    z-index: 99998;
    color: #fff;
}

.wp-calc-toggle-btn:hover {
    background: #135e96;
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.wp-calc-toggle-btn:active {
    transform: scale(0.95);
}

/* Overlay */
.wp-calc-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.wp-calc-overlay.active {
    display: flex;
    opacity: 1;
}

/* Calculator Container */
.wp-calc-container {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    width: 320px;
    padding: 20px;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.wp-calc-overlay.active .wp-calc-container {
    transform: scale(1);
}

/* Header */
.wp-calc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.wp-calc-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1d2327;
}

.wp-calc-close {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #646970;
    transition: color 0.2s ease;
}

.wp-calc-close:hover {
    color: #d63638;
}

/* Display */
.wp-calc-display-wrapper {
    position: relative;
    margin-bottom: 15px;
}

.wp-calc-display {
    width: 100%;
    height: 60px;
    border: 2px solid #dcdcde;
    border-radius: 8px;
    padding: 10px 50px 10px 15px;
    font-size: 24px;
    font-weight: 600;
    text-align: right;
    background: #f6f7f7;
    color: #1d2327;
    box-sizing: border-box;
}

.wp-calc-display:focus {
    outline: none;
    border-color: #2271b1;
}

/* Copy Button */
.wp-calc-copy-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: #2271b1;
    border: none;
    border-radius: 6px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fff;
    transition: all 0.2s ease;
}

.wp-calc-copy-btn:hover {
    background: #135e96;
    transform: translateY(-50%) scale(1.05);
}

.wp-calc-copy-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.wp-calc-copy-btn.copied {
    background: #00a32a;
}

/* Buttons Grid */
.wp-calc-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.wp-calc-btn {
    height: 50px;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #f0f0f1;
    color: #1d2327;
}

.wp-calc-btn:hover {
    background: #dcdcde;
    transform: scale(1.05);
}

.wp-calc-btn:active {
    transform: scale(0.95);
}

/* Number Buttons */
.wp-calc-number {
    background: #fff;
    border: 2px solid #dcdcde;
}

.wp-calc-number:hover {
    background: #f6f7f7;
    border-color: #2271b1;
}

/* Operator Buttons */
.wp-calc-operator {
    background: #2271b1;
    color: #fff;
}

.wp-calc-operator:hover {
    background: #135e96;
}

/* Clear Button */
.wp-calc-clear {
    background: #d63638;
    color: #fff;
}

.wp-calc-clear:hover {
    background: #b32d2e;
}

/* Delete Button */
.wp-calc-delete {
    background: #dba617;
    color: #fff;
}

.wp-calc-delete:hover {
    background: #c08c15;
}

/* Equals Button */
.wp-calc-equals {
    background: #00a32a;
    color: #fff;
}

.wp-calc-equals:hover {
    background: #008a20;
}

/* Zero Button (spans 2 columns) */
.wp-calc-zero {
    grid-column: span 2;
}

/* Responsive Design */
@media screen and (max-width: 782px) {
    .wp-calc-toggle-btn {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
    }

    .wp-calc-container {
        width: 90%;
        max-width: 320px;
    }
}

/* RTL Support */
body.rtl .wp-calc-toggle-btn {
    right: auto;
    left: 30px;
}

body.rtl .wp-calc-display {
    text-align: left;
    padding: 10px 15px 10px 50px;
}

body.rtl .wp-calc-copy-btn {
    right: auto;
    left: 10px;
}