/* ═══════════════════════════════════════════════════════════
   VBA Contact Popup — Styles (VBA Events Design)
   ═══════════════════════════════════════════════════════════ */

:root {
    --vba-orange: #E8792B;
    --vba-orange-hover: #d46a1f;
    --vba-black: #1a1a1a;
    --vba-dark: #333333;
    --vba-gray: #666666;
    --vba-light-gray: #999999;
    --vba-border: #e0e0e0;
    --vba-bg-light: #f7f7f7;
    --vba-white: #ffffff;
}

/* ─── CTA Button (Shortcode) ─────────────────────────────── */
.vba-cta-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    background: var(--vba-orange);
    color: var(--vba-white);
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease;
    letter-spacing: 0.01em;
}
.vba-cta-button:hover {
    background: var(--vba-orange-hover);
    transform: translateY(-1px);
}
.vba-cta-button:active {
    transform: translateY(0);
}

/* ─── Overlay ────────────────────────────────────────────── */
.vba-popup-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.2s ease;
}
.vba-popup-overlay.vba-active {
    opacity: 1;
}

/* ─── Container ──────────────────────────────────────────── */
.vba-popup-container {
    position: relative;
    background: var(--vba-white);
    border-radius: 12px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
    max-width: 500px;
    width: 100%;
    padding: 32px 28px 28px;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(16px) scale(0.98);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.vba-popup-overlay.vba-active .vba-popup-container {
    transform: translateY(0) scale(1);
}

/* ─── Close Button (high specificity to override theme) ──── */
.vba-popup-overlay .vba-popup-container button.vba-popup-close,
.vba-popup-overlay .vba-popup-container button.vba-popup-close:link,
.vba-popup-overlay .vba-popup-container button.vba-popup-close:visited {
    position: absolute !important;
    top: 16px !important;
    right: 16px !important;
    left: auto !important;
    bottom: auto !important;
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    border: none !important;
    border-radius: 4px !important;
    color: #999 !important;
    cursor: pointer !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 30px !important;
    height: 30px !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: 30px !important;
    max-height: 30px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    z-index: 2 !important;
    box-shadow: none !important;
    text-shadow: none !important;
    text-decoration: none !important;
    outline: none !important;
    transform: none !important;
    transition: color 0.15s, background-color 0.15s !important;
    font-size: 0 !important;
    line-height: 1 !important;
    letter-spacing: 0 !important;
    text-indent: 0 !important;
    float: none !important;
    opacity: 1 !important;
}
.vba-popup-overlay .vba-popup-container button.vba-popup-close:hover,
.vba-popup-overlay .vba-popup-container button.vba-popup-close:focus {
    color: #333 !important;
    background: #f7f7f7 !important;
    background-color: #f7f7f7 !important;
    border: none !important;
    box-shadow: none !important;
    transform: none !important;
    outline: none !important;
}
.vba-popup-overlay .vba-popup-container button.vba-popup-close:active {
    background: #eee !important;
    background-color: #eee !important;
    transform: none !important;
}
.vba-popup-overlay .vba-popup-container button.vba-popup-close svg {
    display: block !important;
    width: 16px !important;
    height: 16px !important;
    flex-shrink: 0 !important;
    pointer-events: none !important;
}

/* ─── Header ─────────────────────────────────────────────── */
.vba-popup-header {
    margin-bottom: 20px;
    padding-right: 40px;
}
.vba-popup-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--vba-black);
    margin: 0 0 6px;
    line-height: 1.3;
}
.vba-popup-subtitle {
    font-size: 13px;
    color: var(--vba-gray);
    margin: 0;
    line-height: 1.5;
}

/* ─── Recipient & Subject Info ───────────────────────────── */
.vba-popup-recipient-info,
.vba-popup-subject-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--vba-bg-light);
    border-radius: 6px;
    margin-bottom: 6px;
    font-size: 13px;
}
.vba-popup-to-label,
.vba-popup-subject-label {
    color: var(--vba-light-gray);
    font-weight: 600;
    min-width: 55px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.vba-popup-to-email,
.vba-popup-subject-value {
    color: var(--vba-dark);
    font-weight: 500;
}

/* ─── Form ───────────────────────────────────────────────── */
#vba-popup-form {
    margin-top: 18px;
}
.vba-field-group {
    margin-bottom: 16px;
}
.vba-field-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--vba-dark);
    margin-bottom: 5px;
}
.vba-required {
    color: var(--vba-orange);
}
.vba-field-group input[type="email"],
.vba-field-group textarea {
    width: 100%;
    padding: 11px 13px;
    font-size: 14px;
    border: 1.5px solid var(--vba-border);
    border-radius: 8px;
    background: var(--vba-white);
    color: var(--vba-black);
    transition: border-color 0.2s, box-shadow 0.2s;
    resize: vertical;
    font-family: inherit;
    box-sizing: border-box;
}
.vba-field-group input[type="email"]:focus,
.vba-field-group textarea:focus {
    outline: none;
    border-color: var(--vba-orange);
    box-shadow: 0 0 0 3px rgba(232, 121, 43, 0.12);
}

/* ─── Placeholder Styling ────────────────────────────────── */
.vba-field-group textarea::placeholder {
    color: var(--vba-light-gray);
    font-style: italic;
    opacity: 1;
}
.vba-field-group textarea::-webkit-input-placeholder {
    color: var(--vba-light-gray);
    font-style: italic;
}
.vba-field-group textarea::-moz-placeholder {
    color: var(--vba-light-gray);
    font-style: italic;
}
.vba-field-group input::placeholder {
    color: #bbb;
}

/* ─── Error State ────────────────────────────────────────── */
.vba-field-group input.vba-error,
.vba-field-group textarea.vba-error {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.08);
}
.vba-field-error {
    display: block;
    font-size: 12px;
    color: #dc3545;
    margin-top: 4px;
    min-height: 16px;
}

/* ─── Submit Button ──────────────────────────────────────── */
.vba-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px 24px;
    background: var(--vba-orange);
    color: var(--vba-white);
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.25s ease, opacity 0.2s ease;
    margin-top: 4px;
}
.vba-submit-btn:hover:not(:disabled) {
    background: var(--vba-orange-hover);
}
.vba-submit-btn:active:not(:disabled) {
    opacity: 0.85;
}
.vba-submit-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}
.vba-btn-loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* ─── Success State ──────────────────────────────────────── */
.vba-popup-success {
    text-align: center;
    padding: 24px 0 8px;
}
.vba-success-icon {
    margin-bottom: 14px;
}
.vba-success-text {
    font-size: 14px;
    color: var(--vba-dark);
    line-height: 1.6;
    margin: 0 0 32px;
}
.vba-popup-overlay .vba-popup-container button.vba-popup-close-btn {
    display: inline-flex !important;
    padding: 10px 28px !important;
    background: #f7f7f7 !important;
    background-color: #f7f7f7 !important;
    color: #333 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    font-family: inherit !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    transition: background 0.15s !important;
    box-shadow: none !important;
    text-shadow: none !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    min-width: 0 !important;
    width: auto !important;
    height: auto !important;
}
.vba-popup-overlay .vba-popup-container button.vba-popup-close-btn:hover {
    background: #ececec !important;
    background-color: #ececec !important;
}
/* (hover handled above) */

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 600px) {
    .vba-popup-overlay {
        padding: 12px;
        align-items: flex-end;
    }
    .vba-popup-container {
        padding: 24px 18px 20px;
        border-radius: 14px 14px 0 0;
        max-height: 92vh;
    }
    .vba-popup-header {
        padding-right: 44px;
    }
    .vba-popup-title {
        font-size: 18px;
    }
    .vba-popup-close {
        top: 14px;
        right: 14px;
    }
    .vba-popup-recipient-info,
    .vba-popup-subject-info {
        font-size: 12px;
    }
}
