/* UPSTET Courses Popup - Professional Premium Styling */
/* File: assets/css/upstet-popup.css */

/* Overlay */
.upstet-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.65);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
}

.upstet-popup-overlay.active {
    display: flex;
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Main Container */
.upstet-popup-container {
    position: relative;
    background: linear-gradient(135deg, #ffffff 0%, #f5f8fc 100%);
    border-radius: 20px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35), 0 0 1px rgba(0, 0, 0, 0.1);
    max-width: 520px;
    width: 90%;
    max-height: 88vh;
    overflow-y: auto;
    animation: slideUp 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

@keyframes slideUp {
    from {
        transform: translateY(60px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 50% OFF Badge */
.upstet-discount-badge {
    position: absolute;
    top: -12px;
    right: 25px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 50px;
    box-shadow: 0 8px 20px rgba(255, 107, 107, 0.4);
    display: flex;
    align-items: baseline;
    gap: 4px;
    font-weight: 700;
    z-index: 10001;
    animation: badgeBounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.discount-percent {
    font-size: 18px;
}

.discount-text {
    font-size: 12px;
    letter-spacing: 1px;
}

@keyframes badgeBounce {
    0% {
        transform: scale(0.5) translateY(-20px);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

/* Close Button */
.upstet-popup-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    font-size: 26px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10002;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.upstet-popup-close:hover {
    background: #e74c3c;
    color: white;
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 6px 16px rgba(231, 76, 60, 0.3);
}

/* Header */
.upstet-popup-header {
    background: linear-gradient(135deg, #1a3a52 0%, #2d5a7b 50%, #1e4d70 100%);
    color: white;
    padding: 40px 25px 30px;
    border-radius: 20px 20px 0 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.upstet-popup-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(255,255,255,0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(255,255,255,0.05) 0%, transparent 50%);
    pointer-events: none;
}

.header-icon {
    font-size: 36px;
    margin-bottom: 12px;
    animation: iconFloat 3s ease-in-out infinite;
}

@keyframes iconFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

.upstet-popup-header h2 {
    margin: 0 0 8px 0;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
    position: relative;
    z-index: 1;
}

.upstet-popup-subtitle {
    margin: 0 0 16px 0;
    font-size: 13px;
    opacity: 0.95;
    font-weight: 500;
    position: relative;
    z-index: 1;
    letter-spacing: 0.5px;
}

.header-accent {
    position: relative;
    z-index: 1;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, transparent 0%, #ffd700 50%, transparent 100%);
    margin: 0 auto;
}

/* Content */
.upstet-popup-content {
    padding: 30px 20px;
}

.content-intro {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.08) 0%, rgba(255, 107, 107, 0.08) 100%);
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 25px;
    border-left: 4px solid #ffd700;
}

.upstet-popup-intro {
    margin: 0;
    font-size: 15px;
    color: #333;
    line-height: 1.6;
    font-weight: 600;
}

/* Courses List */
.upstet-courses-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.upstet-course-item {
    display: flex;
    align-items: center;
    padding: 16px;
    background: linear-gradient(135deg, #ffffff 0%, #f9fbfd 100%);
    border: 2px solid #e5e9f2;
    border-radius: 14px;
    text-decoration: none;
    color: #333;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.upstet-course-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: left 0.35s ease;
    z-index: -1;
}

.upstet-course-item:hover::before {
    left: 0;
}

.upstet-course-item:hover {
    color: white;
    border-color: #667eea;
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(102, 126, 234, 0.35);
}

.course-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
    margin-right: 14px;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.upstet-course-item:hover .course-icon {
    background: white;
    color: #667eea;
    transform: scale(1.1);
}

.course-icon svg {
    width: 22px;
    height: 22px;
}

.course-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.course-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 4px;
    transition: color 0.3s ease;
}

.course-details {
    font-size: 12px;
    opacity: 0.75;
    transition: opacity 0.3s ease;
}

.upstet-course-item:hover .course-details {
    opacity: 0.9;
    color: white;
}

.course-action {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 12px;
}

.price-tag {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #333;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    transition: all 0.3s ease;
}

.upstet-course-item:hover .price-tag {
    background: white;
    color: #667eea;
    transform: scale(1.05);
}

.course-arrow {
    font-size: 18px;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.upstet-course-item:hover .course-arrow {
    transform: translateX(6px);
}

/* Offer Timer */
.offer-timer {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
    border: 2px solid #e5e9f2;
    padding: 14px;
    border-radius: 12px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.timer-icon {
    font-size: 20px;
}

.timer-text {
    font-size: 13px;
    color: #555;
    font-weight: 500;
}

/* Footer */
.upstet-popup-footer {
    padding: 24px 20px;
    background: linear-gradient(135deg, #f5f8fc 0%, #f0f4f9 100%);
    border-top: 1px solid #e5e9f2;
    border-radius: 0 0 20px 20px;
}

.benefit-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.benefit-row:last-child {
    margin-bottom: 0;
}

.benefit-item {
    font-size: 12px;
    color: #555;
    text-align: center;
    padding: 8px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e5e9f2;
    font-weight: 500;
    transition: all 0.3s ease;
}

.benefit-item:hover {
    background: #f9fbfd;
    border-color: #667eea;
    color: #667eea;
}

/* Mobile Responsive */
@media (max-width: 600px) {
    .upstet-popup-container {
        width: 95%;
        max-height: 92vh;
        border-radius: 18px;
    }

    .upstet-discount-badge {
        right: 15px;
        padding: 6px 12px;
    }

    .discount-percent {
        font-size: 16px;
    }

    .discount-text {
        font-size: 11px;
    }

    .upstet-popup-header {
        padding: 35px 18px 25px;
        border-radius: 18px 18px 0 0;
    }

    .header-icon {
        font-size: 32px;
        margin-bottom: 10px;
    }

    .upstet-popup-header h2 {
        font-size: 24px;
        font-weight: 800;
    }

    .upstet-popup-subtitle {
        font-size: 12px;
    }

    .upstet-popup-content {
        padding: 24px 16px;
    }

    .upstet-popup-footer {
        padding: 20px 16px;
        border-radius: 0 0 18px 18px;
    }

    .upstet-course-item {
        padding: 14px;
        gap: 10px;
    }

    .course-icon {
        width: 38px;
        height: 38px;
        margin-right: 10px;
    }

    .course-icon svg {
        width: 20px;
        height: 20px;
    }

    .course-title {
        font-size: 14px;
    }

    .course-details {
        font-size: 11px;
    }

    .price-tag {
        padding: 5px 10px;
        font-size: 13px;
    }

    .course-arrow {
        font-size: 16px;
    }

    .benefit-row {
        gap: 10px;
    }

    .benefit-item {
        font-size: 11px;
        padding: 7px;
    }

    .offer-timer {
        padding: 12px;
        gap: 6px;
    }

    .timer-icon {
        font-size: 18px;
    }

    .timer-text {
        font-size: 12px;
    }

    .content-intro {
        padding: 14px;
        margin-bottom: 18px;
    }

    .upstet-popup-intro {
        font-size: 14px;
    }
}

/* Scrollbar Styling */
.upstet-popup-container::-webkit-scrollbar {
    width: 7px;
}

.upstet-popup-container::-webkit-scrollbar-track {
    background: #f5f8fc;
    border-radius: 10px;
}

.upstet-popup-container::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    border: 2px solid #f5f8fc;
}

.upstet-popup-container::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5568d3 0%, #6a3a90 100%);
}