/* ==========================================================
   PERFRIG — NEWSLETTER STYLES
   Two fully isolated systems.
   Sidebar : .pf-sb-*
   Footer  : .pf-ft-*
   No shared selectors, no cross-bleed.
========================================================== */


/* ----------------------------------------------------------
   SIDEBAR NEWSLETTER  (.pf-sb-*)
   Appears inside .sidebar-card on single post pages.
---------------------------------------------------------- */

.pf-sb-wrap {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pf-sb-desc {
    font-size: 14px;
    color: var(--text-secondary, #9ca3af);
    margin: 0 0 4px;
    line-height: 1.6;
}

/* Input */
.pf-sb-email {
    width: 100%;
    padding: 12px;
    background: var(--darker, #0d1117);
    border: 1px solid var(--border, #30363d);
    border-radius: var(--radius-md, 8px);
    color: #fff;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.pf-sb-email:focus {
    outline: none;
    border-color: var(--primary, #06D7F6);
    box-shadow: 0 0 0 3px rgba(6, 215, 246, 0.15);
}

.pf-sb-email::placeholder {
    color: var(--text-muted, #6b7280);
    font-size: 13px;
}

.pf-sb-email.pf-sb-input-error {
    border-color: #ff6b6b;
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.15);
}

/* Error */
.pf-sb-error {
    font-size: 12px;
    color: #ff6b6b;
    min-height: 16px;
    line-height: 1.4;
}

/* Button */
.pf-sb-btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: var(--radius-md, 8px);
    background: var(--gradient-primary, linear-gradient(135deg, #06D7F6, #9333ea));
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    position: relative;
    overflow: hidden;
}

.pf-sb-btn:hover:not(:disabled) {
    opacity: 0.9;
    transform: translateY(-1px);
}

.pf-sb-btn:disabled {
    cursor: not-allowed;
    opacity: 0.65;
}

/* Loading state */
.pf-sb-btn-spinner {
    display: none;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: pf-spin 0.7s linear infinite;
    flex-shrink: 0;
}

.pf-sb-btn.pf-sb-loading .pf-sb-btn-label {
    display: none;
}

.pf-sb-btn.pf-sb-loading .pf-sb-btn-spinner {
    display: inline-block;
}

@keyframes pf-spin {
    to { transform: rotate(360deg); }
}

/* Success */
.pf-sb-success {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary, #06D7F6);
    font-size: 14px;
    padding: 4px 0;
}

.pf-sb-success[hidden] {
    display: none;
}

.pf-sb-success i {
    font-size: 18px;
    flex-shrink: 0;
}


/* ----------------------------------------------------------
   FOOTER NEWSLETTER  (.pf-ft-*)
   Appears in .footer-newsletter column.
---------------------------------------------------------- */

.pf-ft-wrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pf-ft-tagline {
    margin: 10px 0 4px;
    font-size: 12px;
    color: #6B7280;
    line-height: 1.4;
}

/* Row: input + button side-by-side */
.pf-ft-row {
    display: flex;
    background: var(--perfrig-card, #0f1923);
    border: 1px solid var(--perfrig-border, #1e3a4a);
    border-radius: var(--perfrig-radius-md, 6px);
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
    max-width: 300px;
}

.pf-ft-row:focus-within {
    border-color: var(--perfrig-primary, #06D7F6);
    box-shadow: 0 0 0 2px rgba(6, 215, 246, 0.2);
}

/* Input */
.pf-ft-email {
    flex: 1;
    background: transparent;
    border: none;
    padding: 12px 15px;
    color: #fff;
    font-size: 13px;
    font-family: inherit;
    min-width: 0;
}

.pf-ft-email:focus {
    outline: none;
}

.pf-ft-email::placeholder {
    color: rgba(255, 255, 255, 0.45);
    font-size: 12px;
}

/* Button */
.pf-ft-btn {
    background: var(--perfrig-gradient-primary, linear-gradient(135deg, #06D7F6, #9333ea));
    border: none;
    padding: 0 18px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
    flex-shrink: 0;
    font-family: inherit;
}

.pf-ft-btn:hover:not(:disabled) {
    opacity: 0.85;
}

.pf-ft-btn:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

/* Error */
.pf-ft-error {
    font-size: 12px;
    color: #ff4444;
    line-height: 1.4;
    margin-top: 2px;
}

.pf-ft-error[hidden] {
    display: none;
}

/* Success */
.pf-ft-success {
    color: var(--perfrig-primary, #06D7F6);
    font-size: 13px;
    line-height: 1.5;
}

.pf-ft-success[hidden] {
    display: none;
}
