/**
 * Smart App Promotion - Styles
 * Toast notifications and inline promotion banners
 */

/* ─── Toast Component ──────────────────────────────────────── */

.sap-toast {
    position: fixed;
    left: 50%;
    transform: translateX(-50%) translateY(120%);
    z-index: 10050;
    width: calc(100% - 32px);
    max-width: 520px;
    opacity: 0;
    transition: all 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
}

.sap-toast--bottom {
    bottom: 24px;
}

.sap-toast--top {
    top: 80px;
    bottom: auto;
    transform: translateX(-50%) translateY(-120%);
}

.sap-toast--visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.sap-toast--hiding {
    transform: translateX(-50%) translateY(120%);
    opacity: 0;
    pointer-events: none;
}

.sap-toast--top.sap-toast--hiding {
    transform: translateX(-50%) translateY(-120%);
}

.sap-toast__inner {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border-radius: 16px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.06) inset;
    backdrop-filter: blur(20px);
    color: white;
    position: relative;
    overflow: hidden;
}

.sap-toast__inner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899);
    border-radius: 16px 16px 0 0;
}

.sap-toast__icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 18px;
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.sap-toast__body {
    flex: 1;
    min-width: 0;
}

.sap-toast__title {
    font-weight: 700;
    font-size: 14px;
    line-height: 1.3;
    margin-bottom: 2px;
    color: #fff;
}

.sap-toast__msg {
    font-size: 12.5px;
    line-height: 1.4;
    color: #94a3b8;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.sap-toast__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 18px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white !important;
    text-decoration: none !important;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
    letter-spacing: -0.2px;
}

.sap-toast__cta:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
}

.sap-toast__close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #94a3b8;
    cursor: pointer;
    width: 24px;
    height: 24px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    transition: all 0.2s;
    line-height: 1;
    padding: 0;
}

.sap-toast__close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    transform: rotate(90deg);
}

/* ─── Inline Banner (between ads in listings) ──────────────── */

.sap-inline-banner {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border-radius: 16px;
    padding: 24px 28px;
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none !important;
    color: white !important;
    cursor: pointer;
}

.sap-inline-banner:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.sap-inline-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899);
}

.sap-inline-banner__icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 24px;
    color: white;
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

.sap-inline-banner__body {
    flex: 1;
    min-width: 0;
}

.sap-inline-banner__title {
    font-weight: 700;
    font-size: 17px;
    line-height: 1.3;
    margin-bottom: 4px;
    color: #fff;
}

.sap-inline-banner__msg {
    font-size: 14px;
    line-height: 1.5;
    color: #94a3b8;
}

.sap-inline-banner__cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
    transition: all 0.25s ease;
    text-decoration: none;
}

.sap-inline-banner__cta i {
    font-size: 12px;
    transition: transform 0.25s ease;
}

.sap-inline-banner:hover .sap-inline-banner__cta {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.sap-inline-banner:hover .sap-inline-banner__cta i {
    transform: translateX(3px);
}

.sap-inline-banner__dismiss {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: #64748b;
    cursor: pointer;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.2s;
    padding: 0;
}

.sap-inline-banner__dismiss:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

/* ─── Success Page App Promo Section ───────────────────────── */

.sap-success-promo {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border-radius: 16px;
    padding: 28px;
    margin-top: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
    overflow: hidden;
    text-align: left;
}

.sap-success-promo::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899);
}

.sap-success-promo__icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 26px;
    color: white;
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

.sap-success-promo__body {
    flex: 1;
}

.sap-success-promo__title {
    font-weight: 700;
    font-size: 18px;
    color: white;
    margin-bottom: 6px;
}

.sap-success-promo__msg {
    font-size: 14px;
    color: #94a3b8;
    line-height: 1.5;
    margin-bottom: 12px;
}

.sap-success-promo__cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white !important;
    text-decoration: none !important;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    transition: all 0.25s ease;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.sap-success-promo__cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

/* ─── Register Confirmation App Promo ──────────────────────── */

.sap-register-promo {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #bae6fd;
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    text-align: left;
}

.sap-register-promo__icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 20px;
    color: white;
}

.sap-register-promo__body {
    flex: 1;
}

.sap-register-promo__title {
    font-weight: 700;
    font-size: 15px;
    color: #1e40af;
    margin-bottom: 4px;
}

.sap-register-promo__msg {
    font-size: 13px;
    color: #3b82f6;
    line-height: 1.4;
}

.sap-register-promo__cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #2563eb;
    color: white !important;
    text-decoration: none !important;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.sap-register-promo__cta:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

/* ─── Mobile Responsive ────────────────────────────────────── */

@media (max-width: 768px) {
    .sap-toast {
        width: calc(100% - 24px);
        bottom: 16px;
    }

    .sap-toast--top {
        top: 70px;
    }

    .sap-toast__inner {
        padding: 14px 14px;
        gap: 10px;
        flex-wrap: wrap;
    }

    .sap-toast__icon {
        width: 38px;
        height: 38px;
        border-radius: 10px;
        font-size: 16px;
    }

    .sap-toast__title {
        font-size: 13px;
    }

    .sap-toast__msg {
        font-size: 11.5px;
    }

    .sap-toast__cta {
        padding: 7px 14px;
        font-size: 12px;
        border-radius: 8px;
    }

    .sap-inline-banner {
        padding: 18px 16px;
        gap: 14px;
        flex-wrap: wrap;
    }

    .sap-inline-banner__icon {
        width: 44px;
        height: 44px;
        border-radius: 12px;
        font-size: 20px;
    }

    .sap-inline-banner__title {
        font-size: 15px;
    }

    .sap-inline-banner__msg {
        font-size: 13px;
    }

    .sap-inline-banner__cta {
        width: 100%;
        justify-content: center;
        padding: 10px 20px;
    }

    .sap-success-promo {
        flex-direction: column;
        text-align: center;
        padding: 22px 18px;
        gap: 14px;
    }

    .sap-register-promo {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .sap-toast__inner {
        padding: 12px;
        gap: 8px;
    }

    .sap-toast__cta {
        width: 100%;
        justify-content: center;
        margin-top: 4px;
    }
}
