/* ============================================
   IME Brochure Gate — Public UI
   ============================================ */

/* Trigger button */
.imebg-wrap-btn {
    display: inline-block;
}

.imebg-trigger-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #EC2329;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 11px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(236,35,41,0.25);
}

.imebg-trigger-btn:hover {
    background: #c01920;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(236,35,41,0.35);
}

.imebg-trigger-btn svg {
    flex-shrink: 0;
}

/* Overlay */
.imebg-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: rgba(10, 12, 20, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: imebg-fadein 0.2s ease;
}

.imebg-overlay.is-open {
    display: flex;
}

@keyframes imebg-fadein {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Modal box */
.imebg-modal {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 460px;
    padding: 36px 36px 32px;
    position: relative;
    box-shadow: 0 24px 60px rgba(0,0,0,0.18), 0 4px 16px rgba(0,0,0,0.08);
    animation: imebg-slide-up 0.25s cubic-bezier(0.34, 1.3, 0.64, 1);
}

@keyframes imebg-slide-up {
    from { opacity: 0; transform: translateY(24px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0)    scale(1); }
}

/* Close button */
.imebg-modal-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: #f0f0f0;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    color: #555;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
}

.imebg-modal-close:hover {
    background: #e0e0e0;
    color: #111;
}

/* Header */
.imebg-modal-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
}

.imebg-modal-icon {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: #fff0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #EC2329;
}

.imebg-modal-title {
    font-size: 20px;
    font-weight: 700;
    color: #111;
    margin: 0 0 4px;
    line-height: 1.2;
}

.imebg-modal-subtitle {
    font-size: 13px;
    color: #777;
    margin: 0;
}

/* Form fields */
.imebg-field {
    margin-bottom: 18px;
}

.imebg-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}

.imebg-req {
    color: #EC2329;
}

.imebg-field input {
    display: block;
    width: 100%;
    padding: 11px 14px;
    font-size: 14px;
    font-family: inherit;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    color: #111;
    background: #fafafa;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    outline: none;
}

.imebg-field input:focus {
    border-color: #EC2329;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(236,35,41,0.12);
}

.imebg-field input.is-invalid {
    border-color: #d93025;
    box-shadow: 0 0 0 3px rgba(217,48,37,0.1);
}

.imebg-field-error {
    display: block;
    font-size: 12px;
    color: #d93025;
    margin-top: 4px;
    min-height: 16px;
}

/* Footer */
.imebg-form-footer {
    margin-top: 8px;
}

.imebg-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 13px;
    background: #EC2329;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
}

.imebg-submit-btn:hover {
    background: #c01920;
    transform: translateY(-1px);
}

.imebg-submit-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

/* Spinner */
.imebg-btn-loader {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: imebg-spin 0.7s linear infinite;
    flex-shrink: 0;
}

.imebg-submit-btn.is-loading .imebg-btn-loader { display: block; }
.imebg-submit-btn.is-loading .imebg-btn-text   { opacity: 0.7; }

@keyframes imebg-spin {
    to { transform: rotate(360deg); }
}

/* Privacy note */
.imebg-privacy-note {
    font-size: 11.5px;
    color: #999;
    text-align: center;
    margin: 10px 0 0;
}

/* Form messages */
.imebg-form-message {
    margin-top: 14px;
    font-size: 14px;
    border-radius: 8px;
    padding: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.imebg-form-message.is-success {
    padding: 12px 16px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.imebg-form-message.is-error {
    padding: 12px 16px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

/* Success state inside modal */
.imebg-success-state {
    text-align: center;
    padding: 16px 0 8px;
}

.imebg-success-icon {
    width: 56px;
    height: 56px;
    background: #f0fdf4;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: #16a34a;
    font-size: 28px;
}

.imebg-success-state h3 {
    font-size: 18px;
    font-weight: 700;
    color: #111;
    margin: 0 0 8px;
}

.imebg-success-state p {
    font-size: 14px;
    color: #555;
    margin: 0;
}

/* Error notice for shortcode */
.imebg-error {
    color: #d93025;
    font-size: 13px;
}

/* Responsive */
@media (max-width: 480px) {
    .imebg-modal {
        padding: 28px 20px 24px;
        border-radius: 12px;
    }
    .imebg-modal-header {
        gap: 12px;
        margin-bottom: 20px;
    }
    .imebg-modal-title {
        font-size: 17px;
    }
}
