#overlayLast .db-form-area input,
#overlayLast .db-form-area label {
    all: unset;
    box-sizing: border-box;
    font: inherit;
}

#overlayLast .db-form-area input[type="checkbox"] {
    all: revert;
    margin-right: 6px;
}

#overlayLast .db-form-area input[type="text"],
#overlayLast .db-form-area input[type="tel"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

#overlayLast .db-form-area input[type="checkbox"] + label:before {
    content: none !important;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: -webkit-fill-available;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}


.popup-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

 .pop-flex-container {
    display: flex;
    gap: 15px;
    justify-content: center;
}

 .pop-item {
    background: #fff;
    width: 400px; 

}

 .pop-item img {
    width: 100%;
    display: block;
}


 .popup-footer {
    display: flex;
    justify-content: center;
    gap: 20px;
}


 .popup-btn {
    background: #444;      
    color: #fff;          
    padding: 10px 25px;   
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    border-radius: 30px;   
    border: none;          
    outline: none;
    transition: background 0.2s;
    min-width: 140px;     
    text-align: center;
    position: relative;
    opacity: 80%;
}

 .popup-btn:hover {
    background: #222;      
}




@media screen and (max-width: 1280px) {
     .pop-flex-container, .popup-wrapper {
        display: block;         
        position: relative;      
        width: 350px;           
        height: 500px;          
        margin: 0 auto;         
    }

     .pop-item {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        margin: 0;
    }

    #pop1 { z-index: 30; }
    #pop2 { z-index: 20; }
    #pop3 { z-index: 10; }

     .popup-footer {
        position: relative;
        z-index: 100;
    }


     .popup-wrapper.single .pop-item {
        position: relative;    
        width: 100%;
        max-width: 400px;
    }
}




/* 마지막 팝업 */

 .popup-wrapper.single {
    display: flex;
    flex-direction: column;
    align-items: center;
}

 .popup-wrapper.single .popup-footer {
    margin-bottom: 15px; 
    margin-top: 0;
}

 .popup-wrapper.single .pop-item {
    width: 480px;
}


/* DB 팝업 전용 스타일 */
 .db-popup {
    gap: 10px !important; 
}

/* 상단 캡슐형 버튼 보정 */
 .popup-header-btns {
    display: flex;
    gap: 15px;
    margin-bottom: 5px;
}
 .popup-btn.capsule {
    background: rgba(68, 68, 68, 0.8);
    border-radius: 30px;
    padding: 10px 20px;
    font-size: 13px;
    min-width: auto;
}


 .db-popup-content {
    background: #fff;
    width: 400px;
    border-radius: 10px; 
    overflow: hidden; 
}

 .db-popup-content .pop-item img {
    width: 100%;
    height: auto;         
    max-height: 438px;    
    object-fit: contain;   
    display: block;
}


/* DB 부분 */
 .db-form-area {
    padding: 20px;
    background: #f9f9f9;
}

 .db-form-area .input-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

 .db-form-area input[type="text"],
 .db-form-area input[type="tel"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-sizing: border-box; 
    font-size: 14px;
}


 .db-form-area .agreement-group {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #666;
    margin-bottom: 15px;
}

 .db-form-area label {
    cursor: pointer;
}

 .db-form-area .view-detail {
    color: #888;
    text-decoration: underline;
    margin-left: 5px;
}


 .db-form-area .submit-btn {
    width: 100%;
    padding: 15px;
    background: #2b65e2; 
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}

 .db-form-area .submit-btn:hover {
    background: #1a4ab9;
}





@media screen and (max-width: 1280px) {
     div.modal-overlay {
        /*display: flex;*/
        justify-content: center;
        align-items: flex-start;
        padding: 40px 0;
        overflow-y: auto;
    }

     #overlayGroup .popup-wrapper {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

     #overlayGroup .pop-flex-container {
        display: block;
        position: relative;
        width: 350px;
        min-height: 500px; 
        margin: 0 auto;
    }

     #overlayGroup .pop-item {
        position: relative;
        top: 0;
        left: 0;
        width: 100%;
        margin: 0;
    }
    #pop1 { z-index: 30; }
    #pop2 { z-index: 20; }
    #pop3 { z-index: 10; }


     #overlayGroup .popup-footer {
        display: flex;
        gap: 15px;
        z-index: 100;
    }


     #overlayLast .popup-wrapper.db-popup {
        display: flex;
        width: 350px;
        height: auto;
    }

     #overlayLast .db-popup-content {
        display: flex;
        flex-direction: column;
        width: 100%;
        position: relative;
        background: #fff;
        border-radius: 10px;
        overflow: hidden;
    }


     #overlayLast .pop-item {
        position: relative;
        flex: 0 0 auto;
    }

     #overlayLast .pop-item img {
        height: 100%;
        object-fit: contain;
    }


     #overlayLast .db-form-area {
        flex: 1;
        display: flex;
        flex-direction: column;
        padding: 15px;
        background: #f9f9f9;
    }

     .popup-header-btns,
     #overlayLast .popup-footer {
        margin-top: 15px;
        display: flex;
        gap: 15px;
        z-index: 100;
    }
}

 .event-info {
    background: #005724;
    color: #fff;
    padding: 15px 20px;

    max-width: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;

    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

 .event-info p {
    margin: 0;
    font-size: 14px;
    letter-spacing: -0.2px;
}

 .event-info strong {
    color: #ffee00;
    margin-right: 6px;
}

 #eventPeriod {
    font-weight: bold;
}