/* Popup Overlay */
.gbh-popup-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    opacity: 0;
    transition: opacity 0.4s ease;
}
.gbh-popup-overlay.gbh-show {
    opacity: 1;
}

/* Container */
.gbh-popup-container {
    width: 100%;
    max-width: 850px;
    min-height: 480px;
    height: auto;
    max-height: 90vh;
    background: #011627;
    border-radius: 12px;
    display: flex;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    transform: scale(0.95) translateY(20px);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.gbh-popup-overlay.gbh-show .gbh-popup-container {
    transform: scale(1) translateY(0);
}

/* Close Button */
.gbh-popup-close {
    position: absolute;
    top: 15px; right: 20px;
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.5);
    font-size: 28px;
    cursor: pointer;
    z-index: 10;
    line-height: 1;
    transition: color 0.2s;
    padding: 0;
}
.gbh-popup-close:hover { color: #fff; }

/* Left Side (Image) */
.gbh-popup-left {
    flex: 1;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}
.gbh-popup-left::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; width: 100%; height: 50%;
    background: linear-gradient(to top, #011627, transparent);
}
.gbh-popup-left-footer {
    position: relative;
    z-index: 2;
    padding: 30px;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
}

/* Right Side (Content) */
.gbh-popup-right {
    flex: 1.1;
    padding: 30px 40px;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    overflow-y: auto;
}
.gbh-popup-header { margin-bottom: 20px; }
.gbh-popup-logo { max-height: 35px; color: transparent; }
.gbh-popup-title {
    color: #fff;
    font-size: 25px;
    font-weight: 700;
    margin: 0 0 8px 0;
    line-height: 1.2;
}
.gbh-popup-subtitle {
    color: rgba(255,255,255,0.8);
    font-size: 15px;
    margin: 0 0 20px 0;
    line-height: 1.4;
}

/* Form Box */
.gbh-popup-form-box {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}
.gbh-form-group {
    margin-bottom: 12px;
}
.gbh-form-group label {
    display: block;
    color: #4a5568;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 5px;
}
.gbh-form-group label span {
    color: #a0aec0;
    font-size: 11px;
}
.gbh-form-group input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color 0.2s;
    font-family: inherit;
}
.gbh-form-group input:focus {
    outline: none;
    border-color: #3182ce;
}

/* Phone Group specific */
.gbh-phone-input-wrapper {
    display: flex;
    gap: 10px;
}
.gbh-phone-input-wrapper .iti { flex: 1; }
.gbh-submit-btn {
    background: #cbd5e0;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 0 20px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.3s;
    min-width: 110px;
}
.gbh-submit-btn:hover { background: #a0aec0; }
.gbh-submit-btn.active-btn {
    background: #3182ce;
}
.gbh-submit-btn.active-btn:hover {
    background: #2b6cb0;
}
.phone-icon {
    width: 14px; height: 14px;
    display: inline-block;
    vertical-align: middle;
    margin-right: 4px;
}

/* Footer */
.gbh-popup-footer {
    margin-top: auto;
    text-align: right;
    font-size: 11px;
    padding-top: 20px;
}
.powered-by { color: #48bb78; }
.powered-brand { color: rgba(255,255,255,0.5); }

/* Messages */
#gbh-popup-response {
    margin-top: 15px;
    font-size: 14px;
    text-align: center;
}
.gbh-msg-success { color: #48bb78; }
.gbh-msg-error { color: #e53e3e; }

/* Responsive */
@media (max-width: 768px) {
    .gbh-popup-overlay { padding: 15px; }
    .gbh-popup-container {
        flex-direction: column;
        height: 100%;
        max-height: 90vh;
        overflow: hidden;
        border-radius: 12px;
        transform: scale(0.9) translateY(40px); /* Enhance mobile intro animation */
    }
    .gbh-popup-overlay.gbh-show .gbh-popup-container {
        transform: scale(1) translateY(0);
    }
    .gbh-popup-close {
        top: 10px; right: 10px;
        background: rgba(0,0,0,0.5);
        width: 32px; height: 32px;
        border-radius: 50%;
        display: flex; align-items: center; justify-content: center;
        color: #fff;
        z-index: 20;
    }
    .gbh-popup-left {
        min-height: 180px;
        flex: none;
    }
    .gbh-popup-left::after { height: 100%; background: linear-gradient(to top, #011627 0%, transparent 100%); }
    .gbh-popup-left-footer { display: none; }
    .gbh-popup-right {
        padding: 20px 15px;
        overflow-y: auto;
        flex: 1;
        -webkit-overflow-scrolling: touch;
    }
    .gbh-popup-header { margin-bottom: 15px; }
    .gbh-popup-logo { max-height: 30px; }
    .gbh-popup-title { font-size: 22px; margin-bottom: 5px; }
    .gbh-popup-subtitle { font-size: 14px; margin-bottom: 15px; line-height: 1.4; }
    .gbh-popup-form-box { padding: 15px; }
    .gbh-form-group { margin-bottom: 12px; }
    .gbh-form-group label { font-size: 13px; margin-bottom: 4px; }
    .gbh-form-group input { padding: 10px 12px; font-size: 16px; } /* 16px prevents iOS auto-zoom bug */
    .gbh-phone-input-wrapper { flex-direction: column; gap: 10px; }
    .gbh-submit-btn { padding: 12px; font-size: 16px; min-height: 44px; }
    .gbh-popup-footer { padding-top: 15px; }
}
