/* ===== POPUP PPDB ULTRA MODERN & COMPACT ===== */

/* Overlay */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Popup Container - Elegant & Compact */
.popup-container {
    background: #ffffff;
    border-radius: 20px;
    max-width: 720px;
    width: 90%;
    max-height: 75vh;
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(255, 255, 255, 0.1);
    transform: scale(0.95) translateY(20px);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    animation: popup-entrance 0.5s ease-out forwards;
}

/* Force desktop layout for screens > 600px */
@media (min-width: 601px) {
    .popup-body {
        display: flex !important;
        flex-direction: row !important;
    }
    
    .popup-image {
        flex: 1 1 50% !important;
        max-width: 50% !important;
        min-width: 50% !important;
        width: 50% !important;
        order: 1;
        min-height: 300px;
    }
    
    .popup-image img {
        max-height: 280px;
        width: auto;
        object-fit: contain;
    }
    
    .popup-content {
        flex: 1 1 50% !important;
        max-width: 50% !important;
        min-width: 50% !important;
        width: 50% !important;
        order: 2;
    }
}

.popup-overlay.active .popup-container {
    transform: scale(1) translateY(0);
}

@keyframes popup-entrance {
    0% {
        transform: scale(0.7) translateY(50px);
        opacity: 0;
    }
    100% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

/* Close Button - Elegant Design */
.popup-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    color: #1e3c72;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
}

.popup-close:hover {
    background: #ff4757;
    color: white;
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 71, 87, 0.4);
}

/* Popup Header - Elegant & Compact */
.popup-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px 24px 16px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.popup-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.4;
}

.popup-header h2 {
    font-size: 22px;
    font-weight: 700;
    color: white;
    margin: 0 0 6px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
    letter-spacing: -0.3px;
}

.popup-header p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    position: relative;
    z-index: 1;
    font-weight: 500;
}

/* Popup Body - Elegant 50:50 Layout */
.popup-body {
    padding: 0 !important;
    max-height: calc(75vh - 100px);
    overflow: hidden;
    display: flex !important;
    flex-direction: row !important;
    gap: 0;
    align-items: stretch;
}

/* Popup Image Section - Full Display */
.popup-image {
    flex: 1 1 50% !important;
    max-width: 50% !important;
    min-width: 50% !important;
    width: 50% !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    position: relative;
    overflow: visible;
    transition: all 0.4s ease;
}

.popup-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    z-index: 1;
}

.popup-image img {
    width: 100%;
    height: auto;
    border-radius: 0;
    box-shadow: none;
    object-fit: contain;
    max-height: 100%;
    transition: all 0.3s ease;
    position: relative;
    z-index: 4;
    mix-blend-mode: normal;
    opacity: 1;
}

.popup-image:hover img {
    transform: scale(1.05);
}

/* Popup Content Section - Elegant 50% Width */
.popup-content {
    flex: 1 1 50% !important;
    max-width: 50% !important;
    min-width: 50% !important;
    width: 50% !important;
    padding: 20px 18px;
    overflow-y: auto;
    background: #ffffff;
}

/* Gelombang Section - Elegant Card Style */
.gelombang-section {
    margin-bottom: 14px;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 14px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    position: relative;
}

.gelombang-section:hover {
    border-color: #667eea;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.gelombang-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 14px;
    border-radius: 8px;
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.gelombang-header i {
    font-size: 16px;
}

/* Jadwal List - Compact */
.jadwal-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.jadwal-item {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    margin-bottom: 6px;
    background: white;
    border-radius: 8px;
    border-left: 3px solid #667eea;
    transition: all 0.3s ease;
    font-size: 12px;
}

.jadwal-item:hover {
    transform: translateX(3px);
    background: #f0f3ff;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
}

.jadwal-item i {
    font-size: 14px;
    color: #667eea;
    margin-right: 10px;
    min-width: 16px;
}

.jadwal-item strong {
    color: #2d3748;
    font-weight: 700;
    min-width: 160px;
    font-size: 13px;
}

.jadwal-item span {
    color: #4a5568;
    font-weight: 600;
    font-size: 13px;
}

/* Warning Box - Compact */
.warning-box {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
    padding: 12px 16px;
    border-radius: 10px;
    margin-top: 12px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.25);
    animation: pulse-warning 2s ease-in-out infinite;
}

@keyframes pulse-warning {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.01); }
}

.warning-box i {
    font-size: 14px;
    margin-right: 6px;
}

/* Note Box - Compact */
.note-box {
    background: #e8f5e9;
    border-left: 3px solid #4caf50;
    padding: 12px 16px;
    border-radius: 10px;
    margin-top: 16px;
    font-size: 12px;
    color: #2e7d32;
    line-height: 1.5;
}

.note-box strong {
    color: #1b5e20;
    font-weight: 700;
}

/* CTA Button - Modern */
.popup-cta {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.btn-ppdb {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-ppdb::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}

.btn-ppdb:hover::before {
    width: 300px;
    height: 300px;
}

.btn-ppdb:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(102, 126, 234, 0.5);
}

.btn-ppdb i {
    font-size: 16px;
}

/* Tablet - Keep side-by-side layout */
@media (max-width: 768px) and (min-width: 601px) {
    .popup-container {
        width: 95%;
        max-width: 750px;
    }
    
    .popup-image img {
        max-height: 300px;
    }
    
    .popup-content {
        padding: 20px 16px;
    }
    
    .gelombang-section {
        padding: 16px;
        margin-bottom: 14px;
    }
}

/* Mobile - Vertical layout */
@media (max-width: 600px) {
    .popup-container {
        width: 94%;
        border-radius: 20px;
        max-height: 85vh;
    }
    
    .popup-header {
        padding: 20px 20px 16px;
    }
    
    .popup-header h2 {
        font-size: 20px;
    }
    
    .popup-header p {
        font-size: 12px;
    }
    
    .popup-body {
        flex-direction: column !important;
        gap: 0;
    }
    
    .popup-image {
        flex: none !important;
        max-width: 100% !important;
        min-width: 100% !important;
        width: 100% !important;
        min-height: 180px;
        max-height: 200px;
        padding: 16px;
        overflow: hidden;
    }
    
    .popup-image img {
        max-height: 160px;
        width: auto;
        object-fit: contain;
    }
    
    .popup-content {
        max-width: 100% !important;
        min-width: 100% !important;
        width: 100% !important;
        padding: 16px;
    }
    
    .gelombang-section {
        padding: 16px;
        margin-bottom: 14px;
    }
    
    .gelombang-header {
        font-size: 14px;
        padding: 9px 14px;
    }
    
    .jadwal-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        padding: 10px;
        font-size: 12px;
    }
    
    .jadwal-item strong {
        min-width: auto;
        font-size: 12px;
    }
    
    .jadwal-item span {
        font-size: 12px;
    }
    
    .btn-ppdb {
        padding: 13px 28px;
        font-size: 14px;
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .popup-close {
        width: 30px;
        height: 30px;
        top: 10px;
        right: 10px;
        font-size: 14px;
    }
    
    .popup-header {
        padding: 16px 16px 12px;
    }
    
    .popup-header h2 {
        font-size: 18px;
    }
    
    .popup-header p {
        font-size: 11px;
    }
    
    .popup-body {
        flex-direction: column !important;
    }
    
    .popup-image {
        flex: none !important;
        max-width: 100% !important;
        min-width: 100% !important;
        width: 100% !important;
        min-height: 150px;
        max-height: 170px;
        padding: 12px;
        overflow: hidden;
    }
    
    .popup-image img {
        max-height: 130px;
        width: auto;
        object-fit: contain;
    }
    
    .popup-content {
        padding: 18px 14px;
    }
    
    .gelombang-section {
        padding: 14px;
        margin-bottom: 12px;
    }
    
    .gelombang-header {
        font-size: 13px;
        padding: 8px 12px;
    }
    
    .jadwal-item {
        padding: 9px;
        font-size: 11px;
    }
    
    .jadwal-item strong,
    .jadwal-item span {
        font-size: 11px;
    }
    
    .warning-box,
    .note-box {
        padding: 10px 12px;
        font-size: 11px;
    }
    
    .btn-ppdb {
        padding: 12px 24px;
        font-size: 13px;
    }
}

/* Scrollbar - Sleek */
.popup-body::-webkit-scrollbar {
    width: 6px;
}

.popup-body::-webkit-scrollbar-track {
    background: #f1f3f5;
    border-radius: 10px;
}

.popup-body::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 10px;
}

.popup-body::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2, #667eea);
}

/* Date Badge Style */
.gelombang-section > p {
    color: #667eea !important;
    font-weight: 700 !important;
    margin-bottom: 12px !important;
    font-size: 13px !important;
    display: inline-block;
    background: #f0f3ff;
    padding: 6px 12px;
    border-radius: 8px;
}
