/* Deripay Cashier - Premium Glassmorphic Design System */

:root {
    --dp-primary: #3b82f6;
    --dp-primary-glow: rgba(59, 130, 246, 0.5);
    --dp-success: #10b981;
    --dp-error: #ef4444;
    --dp-glass-bg: rgba(15, 23, 42, 0.85);
    --dp-glass-border: rgba(255, 255, 255, 0.08);
    --dp-text-main: #f8fafc;
    --dp-text-muted: #94a3b8;
}

/* --- Trigger Button Styling --- */
.cashier-btn,
.mobile-cashier-btn {
    background: linear-gradient(135deg, #1e40af, #3b82f6) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 4px 15px var(--dp-primary-glow) !important;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1) !important;
    position: relative;
    overflow: hidden;
}

.cashier-btn:hover,
.mobile-cashier-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 25px var(--dp-primary-glow) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
}

.cashier-btn:active,
.mobile-cashier-btn:active {
    transform: translateY(0) scale(0.98);
}

/* --- Modal Wrapper --- */
#deripay-modal-wrapper {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(20px) saturate(180%);
    background: rgba(0, 0, 0, 0.6);
    animation: dpFadeIn 0.4s ease;
}

#deripay-modal-wrapper.active {
    display: flex;
}

.deripay-modal {
    background: var(--dp-glass-bg);
    backdrop-filter: blur(40px);
    border: 1px solid var(--dp-glass-border);
    border-radius: 32px;
    width: 95%;
    max-width: 440px;
    padding: 32px;
    box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.7);
    position: relative;
    color: var(--dp-text-main);
    animation: dpSlideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

@keyframes dpFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes dpSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* --- Modal Header --- */
.deripay-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.deripay-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.deripay-title i {
    font-size: 24px;
    color: var(--dp-primary);
    background: rgba(59, 130, 246, 0.15);
    padding: 8px;
    border-radius: 12px;
}

.deripay-title h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.deripay-balance-badge {
    background: rgba(255, 255, 255, 0.05);
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 600;
    color: var(--dp-text-muted);
}

.deripay-close {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.deripay-close:hover {
    background: rgba(239, 68, 68, 0.15);
    color: var(--dp-error);
    border-color: rgba(239, 68, 68, 0.2);
}

/* --- Segmented Controls (Tabs) --- */
.deripay-tabs {
    display: flex;
    background: rgba(0, 0, 0, 0.4);
    padding: 4px;
    border-radius: 16px;
    margin-bottom: 24px;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.deripay-tab-btn {
    flex: 1;
    padding: 10px;
    border: none;
    background: transparent;
    color: var(--dp-text-muted);
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 12px;
}

.deripay-tab-btn.active {
    background: var(--dp-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

/* --- Input Fields --- */
.deripay-form-group {
    margin-bottom: 20px;
}

.deripay-form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--dp-text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.deripay-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.deripay-input-wrapper i {
    position: absolute;
    left: 16px;
    color: var(--dp-text-muted);
    font-size: 18px;
}

.deripay-form-group input {
    width: 100%;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--dp-glass-border);
    border-radius: 16px;
    padding: 14px 16px 14px 48px;
    color: white;
    font-size: 15px;
    transition: all 0.2s ease;
}

.deripay-form-group input:focus {
    outline: none;
    background: rgba(15, 23, 42, 0.8);
    border-color: var(--dp-primary);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

/* --- Quick Amounts --- */
.dp-quick-amounts {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 20px;
}

.dp-amount-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--dp-glass-border);
    border-radius: 10px;
    padding: 8px;
    color: var(--dp-text-main);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.dp-amount-btn:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--dp-primary);
}

/* --- Exchange Preview --- */
.deripay-rate-preview {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(16, 185, 129, 0.08));
    border: 1px solid rgba(59, 130, 246, 0.1);
    padding: 16px;
    border-radius: 16px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rate-label {
    font-size: 12px;
    color: var(--dp-text-muted);
}

.rate-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--dp-primary);
}

/* --- Buttons --- */
.deripay-submit-btn {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 16px;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: white;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 20px -5px rgba(59, 130, 246, 0.5);
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.deripay-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px -5px rgba(59, 130, 246, 0.6);
}

.deripay-back-btn {
    background: transparent;
    border: 1px solid var(--dp-glass-border);
    color: var(--dp-text-muted);
    padding: 12px;
    border-radius: 16px;
    cursor: pointer;
    font-weight: 600;
    margin-top: 12px;
    width: 100%;
    transition: all 0.2s;
}

.deripay-back-btn:hover {
    background: rgba(255, 255, 255, 0.03);
    color: white;
}

/* --- Choice View --- */
.deripay-choice {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.deripay-choice-btn {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--dp-glass-border);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
}

.deripay-choice-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--dp-primary);
    transform: translateX(6px);
}

.deripay-choice-btn i {
    font-size: 28px;
    color: var(--dp-primary);
    background: rgba(59, 130, 246, 0.1);
    padding: 12px;
    border-radius: 14px;
}

.choice-text h4 {
    margin: 0;
    font-size: 17px;
}

.choice-text p {
    margin: 4px 0 0;
    font-size: 12px;
    color: var(--dp-text-muted);
}

/* --- Status View --- */
.deripay-status {
    text-align: center;
}

.deripay-status i {
    font-size: 64px;
    margin-bottom: 24px;
    display: inline-block;
    filter: drop-shadow(0 0 15px currentColor);
}

#dp-poll-timer {
    display: block;
    margin-top: 16px;
    font-size: 11px;
    color: var(--dp-text-muted);
    letter-spacing: 0.5px;
}

/* --- Tab Panels --- */
.deripay-step {
    display: none;
    animation: dpSlideUp 0.4s ease;
}

.deripay-step.active {
    display: block;
}

.dp-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(59, 130, 246, 0.1);
    border-top: 3px solid var(--dp-primary);
    border-radius: 50%;
    margin: 0 auto 24px;
    animation: dpSpin 1s linear infinite;
}

@keyframes dpSpin {
    to {
        transform: rotate(360deg);
    }
}