/**
 * FSB Newsletter Gate Frontend CSS
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* Prevent body scrolling when gate is active */
body.fsb-gate-active {
    overflow: hidden !important;
    height: 100vh !important;
    width: 100vw !important;
    position: fixed !important;
}

/* Fullscreen Overlay */
.fsb-gate-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(26, 26, 26, 0.85); /* Fallback */
    z-index: 9999999;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-y: auto;
    padding: 20px;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s cubic-bezier(0.25, 1, 0.5, 1), visibility 0.4s;
}

.fsb-gate-overlay.fsb-gate-visible {
    opacity: 1;
    visibility: visible;
}

/* Popup Container */
.fsb-gate-popup {
    background: #ffffff;
    max-width: 520px;
    width: 100%;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    box-sizing: border-box;
    text-align: center;
    position: relative;
    transform: translateY(30px) scale(0.95);
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    color: #1a1a1a;
}

.fsb-gate-overlay.fsb-gate-visible .fsb-gate-popup {
    transform: translateY(0) scale(1);
}

/* Logo */
.fsb-gate-logo {
    max-width: 180px;
    height: auto;
    margin: 0 auto 24px auto;
    display: block;
}

/* Typography */
.fsb-gate-title {
    font-size: 26px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 12px 0;
    color: #1a1a1a;
}

.fsb-gate-description {
    font-size: 15px;
    font-weight: 400;
    line-height: 1.6;
    margin: 0 0 28px 0;
    color: #555555;
}

/* Form Styling */
.fsb-gate-form {
    text-align: left;
}

.fsb-gate-form-group {
    margin-bottom: 20px;
}

.fsb-gate-input {
    width: 100%;
    height: 50px;
    padding: 10px 16px;
    border: 2px solid #e1e1e1;
    border-radius: 8px;
    font-family: inherit;
    font-size: 15px;
    color: #1a1a1a;
    background-color: #f9f9f9;
    box-sizing: border-box;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.fsb-gate-input:focus {
    border-color: #f0c800;
    background-color: #ffffff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(240, 200, 0, 0.15);
}

/* Privacy Checkbox */
.fsb-gate-privacy {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    line-height: 1.5;
    color: #555555;
    cursor: pointer;
    user-select: none;
}

.fsb-gate-privacy input[type="checkbox"] {
    margin-top: 3px;
    width: 16px;
    height: 16px;
    accent-color: #f0c800;
    cursor: pointer;
    flex-shrink: 0;
}

/* Submit Button */
.fsb-gate-submit {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 50px;
    background-color: #f0c800;
    color: #1a1a1a;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
    position: relative;
    padding: 0 20px;
    box-sizing: border-box;
}

.fsb-gate-submit:hover:not(:disabled) {
    background-color: #d9b400;
    box-shadow: 0 4px 12px rgba(240, 200, 0, 0.3);
}

.fsb-gate-submit:active:not(:disabled) {
    transform: scale(0.98);
}

.fsb-gate-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Loading Spinner */
.fsb-gate-spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(26, 26, 26, 0.1);
    border-radius: 50%;
    border-top-color: #1a1a1a;
    animation: fsb-spin 0.8s linear infinite;
    margin-left: 10px;
}

.fsb-gate-loading .fsb-gate-spinner {
    display: inline-block;
}

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

/* Messages */
.fsb-gate-msg {
    margin-top: 15px;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    display: none;
    line-height: 1.4;
}

.fsb-gate-msg-success {
    background-color: #e6f6ec;
    color: #117a3b;
    border: 1px solid #c2ebd0;
}

.fsb-gate-msg-error {
    background-color: #fdf2f2;
    color: #c81e1e;
    border: 1px solid #fbd5d5;
}

/* Accessibility - Focus Trap */
.fsb-gate-popup:focus {
    outline: none;
}
