/* ============================================================
   ainfluencer OnlyFans Creators Form — Embeddable Modal
   Brand-aligned: #ff4a1f primary, Muli/Baskerville typography
   ============================================================ */

/* Demo page (remove when embedding) */
.demo-page {
    font-family: 'Muli', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    max-width: 800px;
    margin: 80px auto;
    padding: 24px;
    text-align: center;
    color: #292728;
}
.demo-page h1 { font-weight: 900; font-size: 36px; margin-bottom: 16px; }
.demo-page p  { font-family: 'Baskerville', Georgia, serif; font-size: 18px; margin-bottom: 32px; }

.demo-trigger-btn {
    font-family: 'Muli', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 700;
    background: #ff4a1f;
    color: #fff;
    border: none;
    padding: 14px 32px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
}
.demo-trigger-btn:hover { background: #e63d14; }
.demo-trigger-btn:active { transform: scale(0.98); }

/* ============================================================
   Modal Overlay
   ============================================================ */
.aif-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 48px 16px;
    overflow-y: auto;
    font-family: 'Muli', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #292728;
}
.aif-modal[aria-hidden="false"] { display: flex; }

.aif-modal__overlay {
    position: fixed;
    inset: 0;
    background: rgba(41, 39, 40, 0.45);
    backdrop-filter: blur(2px);
}

/* ============================================================
   Panel
   ============================================================ */
.aif-modal__panel {
    position: relative;
    width: 100%;
    max-width: 460px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
    overflow: hidden;
    animation: aif-panel-in 0.25s ease-out;
}

@keyframes aif-panel-in {
    from { opacity: 0; transform: translateY(-12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Header */
.aif-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    background: #f5f7fa;
    border-bottom: 1px solid #e7eaee;
}
.aif-modal__title {
    margin: 0;
    font-weight: 900;
    font-size: 18px;
    color: #292728;
}
.aif-modal__close {
    background: transparent;
    border: none;
    font-size: 24px;
    line-height: 1;
    color: #6b7280;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.15s ease, color 0.15s ease;
}
.aif-modal__close:hover { background: rgba(0, 0, 0, 0.06); color: #292728; }

/* Body */
.aif-modal__body {
    padding: 28px 28px 24px;
    text-align: center;
}

/* Logo */
.aif-modal__brand {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}
.aif-modal__logo {
    height: 36px;
    width: auto;
}

/* Heading + description */
.aif-modal__heading {
    margin: 0 0 12px;
    font-weight: 700;
    font-size: 22px;
    color: #292728;
}
.aif-modal__desc {
    font-family: 'Baskerville', Georgia, serif;
    margin: 0 0 24px;
    font-size: 15px;
    line-height: 1.55;
    color: #555;
}

/* ============================================================
   Form fields
   ============================================================ */
.aif-form { display: flex; flex-direction: column; gap: 14px; }
.aif-field { width: 100%; }

.aif-input,
.aif-textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 14px 16px;
    border: 1px solid #d8dde2;
    border-radius: 8px;
    font-family: inherit;
    font-size: 15px;
    color: #292728;
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.aif-input::placeholder,
.aif-textarea::placeholder { color: #9aa0a6; }

.aif-input:focus,
.aif-textarea:focus {
    outline: none;
    border-color: #ff4a1f;
    box-shadow: 0 0 0 3px rgba(255, 74, 31, 0.15);
}

.aif-textarea { min-height: 96px; resize: vertical; line-height: 1.4; }

/* Status messages */
.aif-status {
    min-height: 0;
    font-size: 14px;
    text-align: left;
    transition: min-height 0.2s ease;
}
.aif-status.has-content { min-height: 22px; padding: 4px 2px; }
.aif-status.is-error   { color: #d23020; }
.aif-status.is-success { color: #1aa37a; font-weight: 600; }

/* Submit button */
.aif-submit-btn {
    width: 100%;
    padding: 14px 16px;
    background: #ff4a1f;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
    margin-top: 4px;
}
.aif-submit-btn:hover:not(:disabled) { background: #e63d14; }
.aif-submit-btn:active:not(:disabled) { transform: scale(0.99); }
.aif-submit-btn:disabled {
    background: #c8ccd1;
    color: #f5f5f5;
    cursor: not-allowed;
}

.aif-submit-btn.is-loading::after {
    content: "";
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-left: 10px;
    border: 2px solid rgba(255,255,255,0.45);
    border-top-color: #fff;
    border-radius: 50%;
    animation: aif-spin 0.7s linear infinite;
    vertical-align: middle;
}
@keyframes aif-spin { to { transform: rotate(360deg); } }

/* Toggle link */
.aif-toggle {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #eef0f3;
    text-align: center;
}
.aif-toggle-btn {
    background: transparent;
    border: none;
    color: #365eff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: color 0.15s ease, background 0.15s ease;
}
.aif-toggle-btn:hover { color: #ff4a1f; background: rgba(255, 74, 31, 0.06); }

/* Influencer-flow visual cue */
.aif-modal[data-mode="influencer"] .aif-modal__heading { color: #ff4a1f; }

/* Mobile */
@media (max-width: 480px) {
    .aif-modal { padding: 16px; align-items: stretch; }
    .aif-modal__panel { max-width: 100%; }
    .aif-modal__body { padding: 22px 20px; }
    .aif-modal__heading { font-size: 19px; }
}
