/* ============================================================
   VIAGO DRIVER WEBAPP
   Extends customer.css base styles
   ============================================================ */

/* ============ ONLINE/OFFLINE TOGGLE ============ */
.online-toggle-wrap {
    background: linear-gradient(135deg, var(--brand-secondary), #1a1a1a);
    color: #fff;
    padding: 24px;
    border-radius: 20px;
    margin: 18px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.online-toggle-wrap.is-online {
    background: linear-gradient(135deg, #047857, #10b981);
}
.online-status-label {
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.06em;
    opacity: 0.7;
    margin-bottom: 4px;
}
.online-status-text {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 16px;
}
.online-toggle-btn {
    width: 100%;
    padding: 14px;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: 0;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
}
.online-toggle-btn:hover { background: rgba(255, 255, 255, 0.25); }
.online-toggle-wrap.is-online .online-toggle-btn {
    background: rgba(255, 255, 255, 0.2);
}

.pulse-ring {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #10b981;
    margin-right: 8px;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.8);
    animation: pulse-ring 1.5s ease-out infinite;
}
@keyframes pulse-ring {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6); }
    100% { box-shadow: 0 0 0 14px rgba(16, 185, 129, 0); }
}

/* ============ DRIVER STATS GRID ============ */
.driver-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 0 18px;
}
.driver-stat-card {
    background: #fff;
    border: 1px solid #f1f5f9;
    border-radius: 14px;
    padding: 14px 10px;
    text-align: center;
}
.driver-stat-value {
    font-size: 22px;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 4px;
}
.driver-stat-label {
    font-size: 10px;
    color: var(--brand-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ============ INCOMING RIDE MODAL ============ */
.incoming-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 16px;
    animation: fadeIn 0.3s ease;
}
.incoming-modal-card {
    background: #fff;
    border-radius: 24px 24px 24px 24px;
    padding: 24px;
    width: 100%;
    max-width: 460px;
    animation: slideUpModal 0.3s cubic-bezier(.16,1,.3,1);
    box-shadow: 0 -10px 40px rgba(0,0,0,0.2);
}
@media (min-width: 700px) {
    .incoming-modal {
        align-items: center;
    }
}
@keyframes slideUpModal {
    from { transform: translateY(40px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
.incoming-header {
    text-align: center;
    margin-bottom: 18px;
}
.incoming-header-icon {
    font-size: 40px;
    animation: shake 0.6s ease-in-out infinite alternate;
}
@keyframes shake {
    from { transform: rotate(-5deg); }
    to { transform: rotate(5deg); }
}
.incoming-header-title {
    font-size: 18px;
    font-weight: 800;
    margin: 6px 0 2px;
}
.incoming-header-sub {
    font-size: 13px;
    color: var(--brand-text-muted);
}
.incoming-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 18px;
}

/* Countdown timer for accept */
.incoming-countdown {
    position: relative;
    height: 4px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin: 14px 0;
}
.incoming-countdown-bar {
    position: absolute;
    inset: 0;
    background: var(--brand-primary);
    transform-origin: left;
    animation: countdown 30s linear forwards;
}
@keyframes countdown {
    from { transform: scaleX(1); }
    to { transform: scaleX(0); }
}

/* ============ WALLET CARD ============ */
.wallet-card {
    background: linear-gradient(135deg, var(--brand-secondary), #1a1a1a);
    color: #fff;
    border-radius: 20px;
    padding: 24px;
    margin: 18px;
    position: relative;
    overflow: hidden;
}
.wallet-card::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, var(--brand-primary) 0%, transparent 60%);
    opacity: 0.2;
}
.wallet-balance-label {
    font-size: 11px;
    color: rgba(255,255,255,0.7);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.wallet-balance-value {
    font-size: 36px;
    font-weight: 800;
    margin: 4px 0 14px;
    line-height: 1;
}
.wallet-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding-top: 14px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 12px;
}
.wallet-grid-label { color: rgba(255,255,255,0.6); font-size: 10px; text-transform: uppercase; letter-spacing: 0.04em; }
.wallet-grid-value { font-weight: 700; }

/* ============ WALLET TRANSACTION ROW ============ */
.wallet-tx {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
}
.wallet-tx:last-child { border-bottom: 0; }
.wallet-tx-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-size: 16px;
    flex-shrink: 0;
}
.wallet-tx-icon-credit { background: #ecfdf5; color: #047857; }
.wallet-tx-icon-debit  { background: #fee2e2; color: #b91c1c; }
.wallet-tx-info { flex: 1; min-width: 0; }
.wallet-tx-note {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.wallet-tx-time {
    font-size: 12px;
    color: var(--brand-text-muted);
}
.wallet-tx-amount {
    font-size: 15px;
    font-weight: 700;
    text-align: right;
    flex-shrink: 0;
    padding-left: 12px;
}
.wallet-tx-amount.credit { color: #047857; }
.wallet-tx-amount.debit  { color: #b91c1c; }

/* ============ DOCUMENT UPLOAD ROW ============ */
.doc-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: #fff;
    border: 1.5px solid #f1f5f9;
    border-radius: 14px;
    margin-bottom: 10px;
    transition: border-color 0.15s;
}
.doc-row.is-approved { border-color: #10b981; background: #ecfdf5; }
.doc-row.is-pending  { border-color: #f59e0b; background: #fffbeb; }
.doc-row.is-rejected { border-color: #ef4444; background: #fef2f2; }
.doc-row-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--brand-primary-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}
.doc-row-info { flex: 1; min-width: 0; }
.doc-row-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 2px;
}
.doc-row-status {
    font-size: 12px;
    color: var(--brand-text-muted);
}

/* ============ ONBOARDING PROGRESS ============ */
.onboard-progress {
    display: flex;
    align-items: center;
    padding: 18px;
    gap: 8px;
}
.onboard-step {
    flex: 1;
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
}
.onboard-step.done { background: var(--brand-primary); }
.onboard-step.current {
    background: linear-gradient(90deg, var(--brand-primary) 50%, #e5e7eb 50%);
}

/* ============ VEHICLE CARD ============ */
.driver-vehicle-card {
    background: #fff;
    border: 1.5px solid #f1f5f9;
    border-radius: 16px;
    padding: 18px;
    margin: 18px;
}
.driver-vehicle-name {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 4px;
}
.driver-vehicle-meta {
    color: var(--brand-text-muted);
    font-size: 13px;
    margin-bottom: 12px;
}
.driver-vehicle-plate {
    background: var(--brand-secondary);
    color: var(--brand-primary);
    padding: 6px 14px;
    border-radius: 8px;
    font-family: monospace;
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 2px;
    display: inline-block;
}

/* ============ INCOMING-RIDE banner v dashboarde ============ */
.incoming-banner {
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-accent));
    color: var(--brand-secondary);
    border-radius: 16px;
    padding: 14px 18px;
    margin: 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    animation: incoming-pulse 1.5s ease-in-out infinite;
}
@keyframes incoming-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 201, 60, 0.5); }
    50% { box-shadow: 0 0 0 12px rgba(255, 201, 60, 0); }
}
.incoming-banner-icon { font-size: 24px; }
.incoming-banner-text { flex: 1; font-weight: 700; }
.incoming-banner-arrow { font-size: 20px; }
