/* ============================================
   VTX Popup Banner - Frontend Styles
   ============================================ */

#vtx-popup-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999999;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: vtx-overlay-in 0.3s ease forwards;
}

#vtx-popup-overlay.vtx-active {
    display: flex;
}

@keyframes vtx-overlay-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

#vtx-popup-modal {
    position: relative;
    background: #fff;
    border-radius: var(--vtx-radius, 16px);
    max-width: var(--vtx-max-w, 900px);
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0,0,0,0.35);
    animation: vtx-modal-in 0.35s cubic-bezier(0.34,1.56,0.64,1) forwards;
    font-family: inherit;  /* dùng font của theme */
}

@keyframes vtx-modal-in {
    from { transform: scale(0.88) translateY(20px); opacity: 0; }
    to   { transform: scale(1) translateY(0); opacity: 1; }
}
.vtx-form-area form {
    margin: 0;
}

.vtx-form-area form .ff_submit_btn_wrapper {
    margin: 0;
}
#vtx-popup-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid #e74c3c;
    background: #fff;
    color: #e74c3c;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.2s, color 0.2s, transform 0.15s;
    margin: 0;
    min-height: auto;
}

#vtx-popup-close:hover {
    background: #e74c3c;
    color: #fff;
    transform: scale(1.1);
}

.vtx-popup-inner {
    display: flex;
    min-height: 400px;
}

/* ---- Left image panel ---- */
.vtx-popup-image {
    flex: 0 0 46%;
    overflow: hidden;
    border-radius: var(--vtx-radius, 16px) 0 0 var(--vtx-radius, 16px);
}

.vtx-popup-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.vtx-popup-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1d3557 0%, #457b9d 100%);
}

/* ---- Right content panel ---- */
.vtx-popup-content {
    flex: 1;
    padding: var(--vtx-padding, 40px) var(--vtx-padding, 40px) var(--vtx-padding, 40px) calc(var(--vtx-padding, 40px) - 4px);
    display: flex;
    flex-direction: column;
    gap: 14px;
    overflow-y: auto;
}

/* Badges */
.vtx-popup-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.vtx-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 13px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.03em;
    border: 1.5px solid currentColor;
}

.vtx-badge-1 {
    background: var(--vtx-b1-bg, #fff);
    color: var(--vtx-b1-txt, #1d6ff3);
    border-color: var(--vtx-b1-txt, #1d6ff3);
}

.vtx-badge-2 {
    background: var(--vtx-b2-bg, #1d6ff3);
    color: var(--vtx-b2-txt, #fff);
    border-color: var(--vtx-b2-bg, #1d6ff3);
}

/* Headlines */
.vtx-headline-1 {
    color: var(--vtx-h1-color, #1a1a2e);
    font-size: clamp(22px, 3vw, 30px);
    font-weight: 700;
    line-height: 1.15;
    margin: 0;
}

.vtx-headline-2 {
    color: var(--vtx-h2-color, #1d6ff3);
    font-size: clamp(22px, 3vw, 30px);
    font-weight: 700;
    line-height: 1.15;
    margin: -8px 0 0;
}

/* Sub items */
.vtx-sub-items {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.vtx-sub-items li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 14px;
    color: #444;
    line-height: 1.45;
}

.vtx-sub-items li svg {
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--vtx-h2-color, #1d6ff3);
}

/* Form area */
.vtx-form-area {
    background: #fff8f5;
    border: 1.5px solid #fde0d0;
    border-radius: 10px;
    padding: 16px;
    margin-top: 4px;
}

/* Fluent Forms overrides inside popup */
.vtx-form-area .ff-el-form-control {
    border-radius: 8px !important;
    border: 1.5px solid #e0e0e0 !important;
    font-size: 14px !important;
}

.vtx-form-area .ff_submit_btn_wrapper .ff-btn {
    background: var(--vtx-cta-bg, #e01b24) !important;
    color: var(--vtx-cta-txt, #fff) !important;
    border-radius: 8px !important;
    font-weight: 700 !important;
    letter-spacing: 0.04em !important;
    font-size: 14px !important;
    padding: 12px 24px !important;
    width: 100% !important;
    text-transform: uppercase !important;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 640px) {
    .vtx-popup-inner {
        flex-direction: column;
    }

    .vtx-popup-image {
        flex: 0 0 200px;
        height: 200px;
        border-radius: var(--vtx-radius, 16px) var(--vtx-radius, 16px) 0 0;
    }

    .vtx-popup-content {
        padding: 24px 20px 28px;
        gap: 10px;
    }

    .vtx-headline-1,
    .vtx-headline-2 {
        font-size: 20px;
    }

    #vtx-popup-modal {
        max-height: 95vh;
        overflow-y: auto;
    }
}
