/* ============================================================
   Unified Send Modal — Bağımsız Stil Dosyası
   Video-CV modal yapısı örnek alınarak sıfırdan yazılmıştır.
   Prefix: usm- (unified-send-modal)
   ============================================================ */

/* -- Backdrop / Overlay -- */
.unified-send-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 16px;
}

.unified-send-overlay:not(.hidden) {
    display: flex;
}

/* -- Card -- */
.unified-send-card {
    position: relative;
    background: rgba(12, 20, 35, 0.96);
    border: 1px solid rgba(0, 255, 136, 0.22);
    border-radius: 16px;
    max-width: 460px;
    width: 100%;
    box-shadow:
        0 0 24px rgba(0, 255, 136, 0.06),
        0 14px 48px rgba(0, 0, 0, 0.55);
    overflow: hidden;
    animation: usm-slideIn 0.3s ease-out;
}

@keyframes usm-slideIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* -- Header -- */
.usm-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(0, 255, 136, 0.12);
    background: rgba(0, 255, 136, 0.03);
}

.usm-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #00ff88;
    letter-spacing: 0.3px;
}

.usm-close-btn {
    appearance: none;
    -webkit-appearance: none;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ccc;
    border-radius: 8px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    padding: 0;
    line-height: 1;
}

.usm-close-btn:hover {
    background: rgba(255, 82, 82, 0.15);
    border-color: rgba(255, 82, 82, 0.4);
    color: #ff5252;
}

.usm-close-btn svg {
    width: 16px;
    height: 16px;
}

/* -- Body -- */
.usm-body {
    padding: 24px 20px 16px;
    text-align: center;
}

/* -- Triple-Ring Spinner -- */
.usm-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
}

.usm-spinner {
    width: 52px;
    height: 52px;
    position: relative;
}

.usm-spinner-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3px solid transparent;
}

.usm-spinner-ring:nth-child(1) {
    border-top-color: #00ff88;
    animation: usm-spin 1s linear infinite;
}

.usm-spinner-ring:nth-child(2) {
    inset: 5px;
    border-right-color: #00cc66;
    animation: usm-spin 1.6s linear infinite reverse;
}

.usm-spinner-ring:nth-child(3) {
    inset: 10px;
    border-bottom-color: rgba(0, 255, 136, 0.45);
    animation: usm-spin 2.2s linear infinite;
}

@keyframes usm-spin {
    to { transform: rotate(360deg); }
}

/* Tamamlandığında spinner gizle */
.usm-loader.usm-done {
    display: none;
}

/* -- Status Text -- */
.unified-send-status {
    color: #b0c4cf;
    font-size: 0.88rem;
    margin-bottom: 16px;
    line-height: 1.45;
}

/* -- Progress -- */
.unified-progress-text {
    color: #e0e8ec;
    font-size: 0.92rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.unified-progress-wrap {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    height: 20px;
    overflow: hidden;
    position: relative;
    margin-bottom: 12px;
}

.unified-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #00cc66, #00ff88, #4cff9f);
    border-radius: 12px;
    transition: width 0.4s ease;
    position: relative;
    overflow: hidden;
}

.unified-progress-bar::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.28) 50%, transparent 100%);
    animation: usm-shimmer 1.5s ease-in-out infinite;
}

@keyframes usm-shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* -- Warning -- */
.unified-send-warning {
    color: #ffc107;
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 10px;
    letter-spacing: 0.2px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.unified-send-warning::before {
    content: '\26A0';
    font-size: 0.9rem;
}

/* -- ETA -- */
.unified-eta-text {
    color: #78909c;
    font-size: 0.8rem;
    margin-bottom: 6px;
}

/* -- Current Company -- */
.unified-current-company {
    color: #4cff9f;
    font-size: 0.82rem;
    min-height: 18px;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 10px;
}

/* -- Hourly Warning -- */
.unified-hourly-warning {
    display: none;
    background: rgba(255, 193, 7, 0.08);
    border: 1px solid rgba(255, 193, 7, 0.25);
    border-radius: 10px;
    padding: 10px 14px;
    color: #ffd740;
    font-size: 0.82rem;
    margin-top: 8px;
    animation: usm-pulse 2s ease-in-out infinite;
    line-height: 1.4;
}

.unified-hourly-warning.visible {
    display: block;
}

@keyframes usm-pulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

.unified-hourly-countdown {
    font-weight: 700;
    font-size: 1rem;
    color: #ffc107;
}

/* -- Footer (Buttons) -- */
.usm-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.unified-cancel-btn {
    background: rgba(255, 82, 82, 0.1);
    border: 1px solid rgba(255, 82, 82, 0.35);
    color: #ff5252;
    padding: 10px 24px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}

.unified-cancel-btn:hover {
    background: rgba(255, 82, 82, 0.22);
    transform: scale(1.03);
    box-shadow: 0 0 14px rgba(255, 82, 82, 0.2);
}

.unified-done-btn {
    background: linear-gradient(135deg, #00cc66, #00ff88);
    border: none;
    color: #0a1628;
    padding: 10px 24px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 700;
    display: none;
    transition: box-shadow 0.2s, transform 0.15s;
}

.unified-done-btn:hover {
    box-shadow: 0 0 18px rgba(0, 255, 136, 0.4);
    transform: scale(1.03);
}

/* -- Completion checkmark (replaces spinner when done) -- */
.usm-done-icon {
    display: none;
    margin: 0 auto 16px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(0, 255, 136, 0.12);
    border: 2px solid rgba(0, 255, 136, 0.4);
    align-items: center;
    justify-content: center;
    animation: usm-popIn 0.4s ease-out;
}

.usm-done-icon.visible {
    display: flex;
}

.usm-done-icon svg {
    width: 28px;
    height: 28px;
    color: #00ff88;
}

@keyframes usm-popIn {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ============================================================
   Responsive — Mobile
   ============================================================ */
@media (max-width: 480px) {
    .unified-send-overlay {
        padding: 10px;
    }

    .unified-send-card {
        border-radius: 12px;
        max-width: 100%;
    }

    .usm-header {
        padding: 12px 16px;
    }

    .usm-header h3 {
        font-size: 0.92rem;
    }

    .usm-body {
        padding: 18px 16px 12px;
    }

    .usm-spinner {
        width: 42px;
        height: 42px;
    }

    .usm-footer {
        padding: 12px 16px;
    }

    .unified-cancel-btn,
    .unified-done-btn {
        padding: 9px 18px;
        font-size: 0.82rem;
    }
}
