/* ============================================================
   Sham Cash Portal - Custom Modal, Toast & Utilities
   ============================================================ */

/* Global Reset & Font Settings */
body {
    font-family: 'Cairo', 'Tajawal', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    direction: rtl;
    background-color: #070D1C;
}

/* Modal Overlay & Animations */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: rgba(4, 7, 15, 0.85);
    backdrop-filter: blur(12px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 1000;
}

.modal-overlay.active {
    display: flex;
}

.modal-card {
    background: #0d1424;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 28px;
    padding: 32px 24px;
    max-width: 440px;
    width: 100%;
    position: relative;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.8), 0 0 30px rgba(74, 144, 226, 0.15);
    animation: modalIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    text-align: center;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-close {
    position: absolute;
    top: 16px;
    left: 16px;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.06);
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 20px;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

.modal-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(74, 144, 226, 0.12);
    border: 1px solid rgba(74, 144, 226, 0.3);
    color: #7B9BE8;
    padding: 5px 14px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.modal-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 8px;
}

.modal-desc {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.88rem;
    line-height: 1.6;
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 18px;
    text-align: right;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 8px;
}

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

.input-wrapper svg {
    position: absolute;
    right: 14px;
    color: rgba(255, 255, 255, 0.4);
    pointer-events: none;
}

.input-wrapper input {
    width: 100%;
    background: #141b2d;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 13px 44px 13px 14px;
    color: #ffffff;
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
    transition: all 0.2s;
    direction: rtl;
}

.input-wrapper input:focus {
    border-color: #4a72e8;
    background: #182035;
    box-shadow: 0 0 0 3px rgba(74, 114, 232, 0.25);
}

.input-wrapper input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.modal-submit-btn {
    width: 100%;
    background: linear-gradient(135deg, #5b82ee, #436fea);
    color: #ffffff;
    border: none;
    border-radius: 14px;
    padding: 14px;
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
    box-shadow: 0 10px 24px -6px rgba(67, 111, 234, 0.6);
    transition: all 0.2s;
}

.modal-submit-btn:hover {
    filter: brightness(1.1);
    box-shadow: 0 14px 30px -6px rgba(67, 111, 234, 0.8);
}

.modal-submit-btn:active {
    transform: scale(0.99);
}

/* ============================================================
   Waiting Page Styles (waiting.html)
   ============================================================ */
.waiting-wrapper {
    max-width: 480px;
    margin: 0 auto;
    padding: 24px 16px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    z-index: 10;
}

.waiting-card {
    background: #0d1424;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 32px 24px;
    width: 100%;
    margin-top: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.spinner {
    animation: spin 1.8s linear infinite;
    color: #4a72e8;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

.warning-box {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 16px;
    padding: 16px;
    margin-top: 20px;
    width: 100%;
    display: flex;
    gap: 12px;
    text-align: right;
    align-items: flex-start;
}

.warning-box .warning-icon {
    color: #f59e0b;
    shrink: 0;
}

.warning-box .warning-text {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.82rem;
    line-height: 1.6;
}
