/* Deripay Cashier - Hifex Trader Green Theme */
/* Based on Hifex Trader Charts Theme with green glassmorphic design */

:root {
  /* Hifex Trader Theme Variables (Green) */
  --primary-green: #22c55e;
  --secondary-green: #16a34a;
  --accent-green: #15803d;
  --light-green: #4ade80;
  --dark-green: #14532d;
  --forest-green: #166534;
  --sage-green: #86efac;
  
  /* Background Colors */
  --background-black: #000000;
  --dark-navy: #0a0a0a;
  --slate: #1a1a1a;
  --light-slate: #2a2a2a;
  
  /* Text Colors */
  --white: #ffffff;
  --light-text: #f0f0f0;
  --muted-text: #a0a0a0;
  
  /* Status Colors */
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  
  /* Glass Effects */
  --glass-bg: rgba(0, 0, 0, 0.85);
  --glass-light: rgba(34, 197, 94, 0.08);
  --glass-medium: rgba(34, 197, 94, 0.12);
  --glass-green: rgba(34, 197, 94, 0.15);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-border-hover: rgba(255, 255, 255, 0.2);
  
  /* Shadows */
  --shadow-compact: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 4px 12px rgba(34, 197, 94, 0.4);
  --shadow-active: 0 8px 20px rgba(34, 197, 94, 0.3);
  --shadow-glow: 0 0 20px rgba(34, 197, 94, 0.4);
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #14532d 0%, #16a34a 50%, #22c55e 100%);
  --gradient-accent: linear-gradient(45deg, #22c55e 0%, #4ade80 100%);
  --gradient-black: linear-gradient(135deg, #000000 0%, #1a1a1a 50%, #2a2a2a 100%);
  --gradient-success: linear-gradient(135deg, #14532d 0%, #10b981 50%, #34d399 100%);
  --gradient-shimmer: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.4) 50%, transparent 100%);
  
  /* Transitions */
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --transition-bounce: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);

  /* Deripay mapped variables */
  --dp-primary: var(--primary-green);
  --dp-primary-glow: rgba(34, 197, 94, 0.5);
  --dp-success: var(--success);
  --dp-error: var(--danger);
  --dp-glass-bg: var(--glass-bg);
  --dp-glass-border: var(--glass-border);
  --dp-text-main: var(--white);
  --dp-text-muted: var(--muted-text);
}

/* --- Trigger Button Styling --- */
.cashier-btn,
.mobile-cashier-btn {
    background: var(--gradient-primary) !important;
    border: 1px solid var(--glass-border) !important;
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.4) !important;
    transition: var(--transition-smooth) !important;
    position: relative;
    overflow: hidden;
}

.cashier-btn:hover,
.mobile-cashier-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 25px rgba(34, 197, 94, 0.5) !important;
    border-color: var(--glass-border-hover) !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.75);
    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: var(--glass-green);
    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 var(--glass-border);
    color: var(--white);
    width: 36px;
    height: 36px;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition-smooth);
    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.5);
    padding: 4px;
    border-radius: 16px;
    margin-bottom: 24px;
    border: 1px solid var(--glass-border);
}

.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: var(--transition-smooth);
    border-radius: 12px;
}

.deripay-tab-btn.active {
    background: var(--dp-primary);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(34, 197, 94, 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(0, 0, 0, 0.6);
    border: 1px solid var(--dp-glass-border);
    border-radius: 16px;
    padding: 14px 16px 14px 48px;
    color: var(--white);
    font-size: 15px;
    transition: var(--transition-smooth);
}

.deripay-form-group input:focus {
    outline: none;
    background: rgba(0, 0, 0, 0.8);
    border-color: var(--dp-primary);
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.2);
}

/* --- 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: var(--transition-smooth);
}

.dp-amount-btn:hover {
    background: var(--glass-medium);
    border-color: var(--dp-primary);
}

/* --- Exchange Preview --- */
.deripay-rate-preview {
    background: linear-gradient(135deg, var(--glass-light), rgba(16, 185, 129, 0.08));
    border: 1px solid rgba(34, 197, 94, 0.15);
    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: var(--gradient-success);
    color: var(--white);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 20px -5px rgba(34, 197, 94, 0.5);
    transition: var(--transition-smooth);
}

.deripay-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px -5px rgba(34, 197, 94, 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: var(--transition-smooth);
}

.deripay-back-btn:hover {
    background: var(--glass-light);
    color: var(--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: var(--transition-smooth);
}

.deripay-choice-btn:hover {
    background: var(--glass-light);
    border-color: var(--dp-primary);
    transform: translateX(6px);
}

.deripay-choice-btn i {
    font-size: 28px;
    color: var(--dp-primary);
    background: var(--glass-green);
    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 var(--dp-primary));
}

#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(34, 197, 94, 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);
    }
}