/* ============================================
   CG4 NOTIFICATION SYSTEM
   ============================================ */

.cg4-notify {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0px;
    right: 0px;
    margin: 16px;
    width: min-content;
    min-width: 400px;
    z-index: 3000;
    gap: 0.5rem;
}

.cg4-notify-card {
    padding: var(--padding_base);
    border-radius: var(--radius-md);
    backdrop-filter: blur(8px);
    box-shadow: var(--shadow-lg);
}

.cg4-notify-message {
    font-size: 0.875rem;
    margin-top: 8px;
    line-height: 1.4;
}

/* Notify Color Variants */
.notify-red,
.cg4-notify-red {
    color: var(--red-400);
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid var(--red-500);
}

.cg4-notify-green {
    color: var(--green-400);
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid var(--green-500);
}

.cg4-notify-blue {
    color: var(--blue-400);
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid var(--blue-500);
}

.cg4-notify-orange {
    color: var(--orange-400);
    background: rgba(249, 115, 22, 0.15);
    border: 1px solid var(--orange-500);
}

/* ============================================
   POPUP/MODAL SYSTEM
   ============================================ */

.popup_back {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--black);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease-out;
    will-change: opacity;
    z-index: var(--z-index, 1000);
}

.popup_back.visible {
    opacity: 0.8;
    pointer-events: auto;
}

.popup_panel {
    position: fixed;
    display: flex;
    flex-direction: column;
    min-width: 300px;
    max-width: 90vw;
    max-height: 90vh;
    background: var(--surface-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: translateY(20px);
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
    will-change: transform, opacity;
    z-index: var(--z-index, 1001);
    padding: 2rem;
}

.popup_panel.visible {
    opacity: 1;
    transform: translateY(0);
}

.popup_panel.hidden {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

.popup_title {
    padding: 0 0 1.5rem;
    border-top-left-radius: inherit;
    border-top-right-radius: inherit;
    justify-content: space-between;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
}

.popup_title span {
    gap: 16px;
    display: flex;
    align-items: center;
}

.popup_title img {
    cursor: pointer;
    height: 24px;
    width: 24px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    padding: 4px;
    transition: all 0.15s ease;
    opacity: 0.7;
    filter: invert(1);
}

.popup_title img:hover {
    border-color: var(--border-medium);
    background: var(--surface-tertiary);
    opacity: 1;
}

.popup-line {
    height: 1px;
    background-color: var(--border-light);
    margin: 0;
}

.popup_content {
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    color: var(--text-primary);
}

.popup-end {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-light);
}


.popup-end button {
    min-width: 100px;
}

/* ============================================
   RESPONSIVE POPUP
   ============================================ */

@media (max-width: 768px) {
    .popup_panel {
        width: 90vw !important;
        max-height: 90vh !important;
        margin: 16px;
        padding: 1.5rem;
    }
    
    .popup_content {
        -webkit-overflow-scrolling: touch;
    }
    
    .cg4-notify {
        min-width: 300px;
        margin: 12px;
    }
}




