/* ==========================================================================
   Base Layout
   ========================================================================== */
.sop-optin-card {
    padding: 35px 25px; 
    font-family: inherit;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 20px;
    
    text-align: var(--sop-align);
    box-shadow: var(--sop-shadow);
    border: var(--sop-border-width) solid var(--sop-border-color);
    border-radius: var(--sop-border-radius);
    
    position: relative; 
    overflow: hidden; 
}

.sop-ajax-form { width: 100%; }

.sop-optin-card h2 { 
    margin: 0; 
    font-size: var(--sop-heading-size, 2rem); 
    line-height: 1.2; 
    font-weight: 800; 
    letter-spacing: -0.02em;
}

.sop-optin-card .sop-description { 
    margin: 0; 
    font-size: var(--sop-desc-size, 1.1rem); 
    opacity: 0.9; 
    line-height: 1.5;
}

/* ==========================================================================
   Layout Controller (Stacked vs Inline)
   ========================================================================== */
.sop-form-group { 
    display: flex; 
    gap: 10px; 
    width: 100%; 
}

/* --- STACKED --- */
.sop-layout-stacked .sop-form-group {
    flex-direction: column;
}
.sop-layout-stacked .sop-submit-btn,
.sop-layout-stacked .sop-input {
    width: 100%; 
}

/* --- INLINE (Graceful Wrap) --- */
.sop-layout-inline .sop-form-group {
    flex-direction: row;
    flex-wrap: wrap; /* Allows it to stack cleanly if space runs out */
}
.sop-layout-inline .sop-input {
    flex: 1 1 200px; /* Stays inline if it has at least 200px, otherwise wraps */
    min-width: 0; 
}
.sop-layout-inline .sop-submit-btn {
    flex: 1 1 auto; /* If it wraps, it stretches to fill the bottom line completely */
    white-space: nowrap; 
}

/* ==========================================================================
   Inputs & Buttons Styling
   ========================================================================== */
.sop-input { 
    padding: 16px; 
    border: 1px solid rgba(0,0,0,0.15); 
    border-radius: 8px; 
    font-size: 1rem;
    box-sizing: border-box;
    background: #fff;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.sop-input:focus { border-color: currentColor; }

.sop-submit-btn {
    padding: 16px 30px;
    border: none;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: var(--sop-btn-size, 1.1rem); 
    transition: transform 0.2s ease, opacity 0.2s ease;
    background-color: var(--sop-btn-bg);
    color: var(--sop-btn-text);
}
.sop-submit-btn:hover { transform: translateY(-2px); }
.sop-submit-btn:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }
.sop-response { margin-top: 10px; font-weight: bold; display: none; font-size: 0.95rem; }

/* ==========================================================================
   Checkboxes & Bulletproof Spam Prevention
   ========================================================================== */
.sop-consent-wrapper { margin-top: 5px; }
.sop-consent-wrapper label { display: flex; align-items: flex-start; gap: 10px; font-size: 0.9rem; opacity: 0.8; cursor: pointer; line-height: 1.4; color: inherit; }
.sop-consent-wrapper input[type="checkbox"] { margin-top: 3px; cursor: pointer; flex-shrink: 0; }

.sop-hp-wrapper {
    position: absolute !important;
    opacity: 0 !important;
    top: 0 !important;
    left: -9999px !important;
    z-index: -1 !important;
    height: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
}