/* =============================================================
   KBank Language Fallback Popup — CSS
   
   วิธีใช้: เพิ่ม link stylesheet ใน <head> ของ Master Page
   ============================================================= */

/* Overlay */
.eng-error-popup-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(11, 11, 11, 0.9);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 20px;
    pointer-events: none;
    visibility: hidden;
}
.eng-error-popup-overlay.active {
    display: flex;
    animation: engPopupFadeIn 0.3s ease;
    pointer-events: auto;
    visibility: visible;
}

@keyframes engPopupFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes engPopupSlideUp {
    from { opacity: 0; transform: translateY(30px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Card */
.eng-error-popup-card {
    background: #fff;
    border-radius: 16px;
    position: relative;
    max-width: 960px;
    width: 100%;
    padding: 115px 16px 91px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 48px;
    animation: engPopupSlideUp 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* Close */
.eng-error-popup-card .mfp-close {
    display: block;
    width: 40px;
    height: 40px;
    line-height: 30px;
    border-radius: 50%;
    background: #00A950;
    color: #fff;
    font-size: 16px;
    text-align: center;
    position: absolute;
    top: -20px !important;
    right: -20px !important;
    z-index: 1;
    opacity: 1;
    -webkit-tap-highlight-color: transparent;
touch-action: manipulation;
}
.eng-error-popup-card .mfp-close:after {
    content: '\e921';
    font-family: iconkcc;
    font-size: 1em;
}
.eng-error-popup-close:hover {
    background: #008a42;
    transform: scale(1.1);
}
.eng-error-popup-close svg {
    width: 16px;
    height: 16px;
    fill: #fff;
}

/* Flags */
.eng-error-popup-flags {
    /* flex-shrink: 0; */
    display: flex;
    align-items: center;
    justify-content: center;
}
.eng-error-popup-flag-group {
    position: relative;
    width: 100%;
    height: auto;
}
.eng-error-popup-flag-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(0, 169, 80, 0.12) 0%, transparent 70%);
    border-radius: 50%;
}
.eng-error-popup-flag-circle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #e8e8e8;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #f5f5f5;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.eng-error-popup-flag-circle.flag-from {
    left: 10px;
    z-index: 2;
}
.eng-error-popup-flag-circle.flag-to {
    right: 10px;
    z-index: 2;
}
.eng-error-popup-flag-circle img,
.eng-error-popup-flag-circle svg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.eng-error-popup-arrows {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    gap: 2px;
    z-index: 3;
}
.eng-error-popup-arrows .chevron {
    color: #00a950;
    font-size: 22px;
    font-weight: 900;
    line-height: 1;
}

/* Content */
.eng-error-popup-content {
    /* flex: 1; */
    text-align: center;
}
.eng-error-popup-title {
    color: #00A94F;
    font-size: 26px;
    font-weight: 600;
    line-height: 1.5;
    margin-bottom: 4px;
}
.eng-error-popup-title-en {
    color: #00A94F;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.5;
    margin-bottom: 16px;
}
.eng-error-popup-desc {
    color: #333;
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 56px !important;
}
.eng-error-popup-desc p {
    margin: 0 !important;
}
.eng-error-popup-desc p#engErrorDescTh {
    margin-bottom: 4px !important;
}

/* ปุ่ม 2 ปุ่มเรียงแนวนอน */
.eng-error-popup-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
}
.eng-error-popup-actions .eng-error-popup-btn {
    min-width: 243px;
    padding: 9px 32px;
    height: 40px;
    align-items: center;
    justify-content: center;
    display: flex;
}
.eng-error-popup-btn {
    display: inline-block;
    background: #00A94F;
    color: #fff !important;
    border: none;
    border-radius: 8px;
    padding: 0 32px;
    min-width: 190px;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    text-decoration: none;
    /* box-shadow: 0 4px 12px rgba(0, 169, 80, 0.3); */
    text-align: center;
    -webkit-tap-highlight-color: transparent;
touch-action: manipulation;
}
.eng-error-popup-btn:visited {
  background: #00A94F;
  color: #fff;
}

.eng-error-popup-btn:hover {
  background: #0BC160;
  color: #fff;
}
/* .eng-error-popup-btn:active {
    transform: translateY(0);
} */

/* Mobile */
@media (max-width: 768px) {
    .eng-error-popup-card {
        flex-direction: column;
        text-align: center;
        gap: 0;
        padding: 24px 16px;
        max-width: 296px;
        border-radius: 8px;
        width: calc(100% - 30px) !important;
    }
    .eng-error-popup-content { text-align: center; width: 100%;}
    .eng-error-popup-title { font-size: 20px; margin-bottom: 0;}
    .eng-error-popup-title-en { font-size: 16px; margin-bottom: 8px; }
    .eng-error-popup-desc { font-size: 16px; margin-bottom: 24px !important; }
    .eng-error-popup-actions { flex-direction: column; gap: 8px; }
    .eng-error-popup-actions .eng-error-popup-btn { min-width: 0; padding: 8px 24px; }
    .eng-error-popup-btn { 
      width: 100%; 
      padding: 8px 24px; 
      font-size: 16px;
      line-height: 24px;
    }
    .eng-error-popup-flag-group { max-width: 200px; }
    .eng-error-popup-flag-circle { width: 56px; height: 56px; }
    .eng-error-popup-flag-glow { width: 130px; height: 130px; }
}