/* ============================================================
   Form — Generating animation + Success screen styles
   ============================================================ */

/* ── Generating overlay ──────────────────────────────────────── */
.form-generating {
    position: fixed;
    inset: 0;
    background: rgba(26,15,12,.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    animation: formGenFadeIn .3s ease;
}

@keyframes formGenFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.form-generating-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 48px 32px;
    text-align: center;
}

/* ── Envelope animation ──────────────────────────────────────── */
.form-gen-envelope {
    position: relative;
    width: 80px;
    height: 60px;
    animation: formGenFloat 2s ease-in-out infinite;
}

@keyframes formGenFloat {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-10px); }
}

.form-gen-env-body {
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, #D4B87A 0%, #B8924A 100%);
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.form-gen-env-flap {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 30px;
    overflow: hidden;
    z-index: 2;
}
.form-gen-env-flap::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    border-left: 40px solid transparent;
    border-top: 30px solid #C9A96E;
}
.form-gen-env-flap::after {
    content: '';
    position: absolute;
    top: 0; right: 0;
    border-right: 40px solid transparent;
    border-top: 30px solid #C9A96E;
}

.form-gen-env-letter {
    animation: formGenLetterPulse 1.5s ease-in-out infinite;
}
@keyframes formGenLetterPulse {
    0%, 100% { transform: scale(1);    opacity: 1; }
    50%       { transform: scale(1.15); opacity: .7; }
}

/* ── Generating text ─────────────────────────────────────────── */
.form-gen-title {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 22px;
    font-weight: 300;
    color: #FAF6F1;
    margin: 0;
}

.form-gen-sub {
    font-family: 'Jost', sans-serif;
    font-size: 12px;
    letter-spacing: .1em;
    color: rgba(250,246,241,.4);
    margin: 0;
}

/* ── Loading dots ────────────────────────────────────────────── */
.form-gen-dots {
    display: flex;
    gap: 6px;
    align-items: center;
}
.form-gen-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #C48B9F;
    animation: formGenDot .8s ease-in-out infinite;
}
.form-gen-dots span:nth-child(2) { animation-delay: .15s; }
.form-gen-dots span:nth-child(3) { animation-delay: .30s; }

@keyframes formGenDot {
    0%, 100% { opacity: .3; transform: scale(.8); }
    50%       { opacity: 1;  transform: scale(1.2); }
}

/* ── Success screen ──────────────────────────────────────────── */
.form-step-success {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 40px 24px 60px;
    text-align: center;
    max-width: 480px;
    margin: 0 auto;
    animation: formSuccessIn .5s cubic-bezier(.16, 1, .3, 1);
}

@keyframes formSuccessIn {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.form-success-icon {
    font-size: 56px;
    animation: formSuccessIconBounce .6s cubic-bezier(.36, .07, .19, .97) .2s both;
}
@keyframes formSuccessIconBounce {
    0%   { transform: scale(0);   opacity: 0; }
    60%  { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(1);   opacity: 1; }
}

.form-success-title {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 28px;
    font-weight: 300;
    color: #1A0F0C;
    margin: 0;
}

.form-success-sub {
    font-size: 13px;
    color: #9E8C87;
    margin: 0;
    line-height: 1.6;
}

/* ── Invitation ID ───────────────────────────────────────────── */
.form-success-meta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 20px;
    background: #F5F0E8;
    border: 1px solid #E8DDD4;
    border-radius: 4px;
    width: 100%;
}
.form-success-meta-label {
    font-size: 9px;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: #9E8C87;
    font-family: 'Jost', sans-serif;
}
.form-success-meta-value {
    font-size: 13px;
    color: #3A3230;
    word-break: break-all;
    font-family: 'Courier New', monospace;
}

/* ── Shareable link card — upgraded ─────────────────────────── */
.form-success-link-card {
    width: 100%;
    background: #1A0F0C;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form-success-link-label {
    font-family: 'Jost', sans-serif;
    font-size: 10px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: rgba(250,246,241,.4);
    margin: 0;
    text-align: left;
}

.form-success-link-box {
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 4px;
    padding: 12px 14px;
    text-align: left;
    word-break: break-all;
}

.form-success-link-text {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: #C9A96E;
    line-height: 1.5;
}

/* ── Copy button ─────────────────────────────────────────────── */
.form-success-copy-btn {
    width: 100%;
    padding: 12px;
    background: #C48B9F;
    border: none;
    border-radius: 4px;
    font-family: 'Jost', sans-serif;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: .06em;
    color: #fff;
    cursor: pointer;
    transition: all .2s;
}
.form-success-copy-btn:hover  { background: #A06070; }
.form-success-copy-btn--done  {
    background: #8FAF8A;
    animation: formCopySuccess .3s ease;
}
@keyframes formCopySuccess {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.03); }
    100% { transform: scale(1); }
}

/* ── Email confirmation ──────────────────────────────────────── */
.form-success-email-note {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: rgba(143,175,138,.1);
    border: 1px solid rgba(143,175,138,.3);
    border-radius: 4px;
    width: 100%;
    text-align: left;
}
.form-success-email-icon  { font-size: 22px; flex-shrink: 0; }
.form-success-email-title {
    font-size: 12px;
    font-weight: 500;
    color: #5A8A55;
    margin: 0 0 2px;
    font-family: 'Jost', sans-serif;
}
.form-success-email-addr {
    font-size: 12px;
    color: #6B5B54;
    margin: 0;
    font-family: 'Courier New', monospace;
}

/* ── No email warning ────────────────────────────────────────── */
.form-success-no-email {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: rgba(192,57,43,.06);
    border: 1px solid rgba(192,57,43,.2);
    border-radius: 4px;
    width: 100%;
    text-align: left;
}
.form-success-no-email-icon  { font-size: 20px; flex-shrink: 0; }
.form-success-no-email-title {
    font-size: 13px;
    font-weight: 500;
    color: #C0392B;
    margin: 0 0 6px;
    font-family: 'Jost', sans-serif;
}
.form-success-no-email-msg {
    font-size: 12px;
    color: #6B5B54;
    line-height: 1.7;
    margin: 0;
    font-family: 'Jost', sans-serif;
}

/* ── Action buttons ──────────────────────────────────────────── */
.form-success-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}
.form-btn-open {
    display: block;
    text-align: center;
    text-decoration: none;
    width: 100%;
    box-sizing: border-box;
}

/* ── Tips ────────────────────────────────────────────────────── */
.form-success-tips {
    width: 100%;
    padding: 16px 20px;
    background: #FAF6F1;
    border: 1px solid #E8DDD4;
    border-radius: 4px;
    text-align: left;
}
.form-success-tips-title {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #9E8C87;
    margin: 0 0 10px;
    font-family: 'Jost', sans-serif;
}
.form-success-tips-list {
    margin: 0;
    padding-left: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.form-success-tips-list li {
    font-size: 13px;
    color: #6B5B54;
    line-height: 1.5;
    font-family: 'Jost', sans-serif;
}
.form-tips-warn {
    color: #C0392B !important;
    font-weight: 500;
}
