/*
 * Post Gate — Frontend Styles v1.2.1
 * Content gating UI: inline box, teaser + fade, and modal.
 */

/* -- Teaser --------------------------------------------------------------- */
.post-gate-teaser-wrap {
    position: relative;
    overflow: hidden;
    margin-bottom: 0;
    -webkit-mask-image: linear-gradient(to bottom, #000 40%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 40%, transparent 100%);
}

.post-gate-teaser {
    color: inherit;
    line-height: 1.8;
    font-size: inherit;
}

/* Hidden — fade is handled by mask-image on the wrapper */
.post-gate-fade {
    display: none;
}

/* -- Container ------------------------------------------------------------ */
.post-gate-container {
    margin: 0 0 40px;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
}

/* -- Box ------------------------------------------------------------------ */
.post-gate-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    color: white;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    position: relative;
    overflow: hidden;
}

.post-gate-box::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: post-gate-pulse 4s ease-in-out infinite;
}

@keyframes post-gate-pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.3; }
}

/* -- Color schemes -------------------------------------------------------- */
.post-gate-blue   .post-gate-box { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.post-gate-green  .post-gate-box { background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%); }
.post-gate-purple .post-gate-box { background: linear-gradient(135deg, #8E2DE2 0%, #4A00E0 100%); }
.post-gate-red    .post-gate-box { background: linear-gradient(135deg, #ee0979 0%, #ff6a00 100%); }
.post-gate-dark   .post-gate-box { background: linear-gradient(135deg, #232526 0%, #414345 100%); }
.post-gate-gold   .post-gate-box { background: linear-gradient(135deg, #f2994a 0%, #f2c94c 100%); }

/* -- Elements ------------------------------------------------------------- */
.post-gate-icon {
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.post-gate-heading {
    font-size: 32px;
    margin: 0 0 10px 0;
    font-weight: 700;
    position: relative;
    z-index: 1;
    color: white;
}

.post-gate-subheading {
    font-size: 20px;
    margin: 0 0 20px 0;
    opacity: 0.95;
    position: relative;
    z-index: 1;
}

.post-gate-message {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 25px;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

.post-gate-benefits {
    list-style: none !important;
    padding: 0 !important;
    margin: 25px auto;
    text-align: left;
    display: inline-block;
    position: relative;
    z-index: 1;
    max-width: 400px;
}

.post-gate-benefits li {
    margin: 10px 0;
    font-size: 15px;
    opacity: 0.95;
    list-style: none !important;
    list-style-type: none !important;
}

.post-gate-benefits li::before,
.post-gate-benefits li::marker {
    content: none !important;
    display: none !important;
}

/* -- Buttons -------------------------------------------------------------- */
.post-gate-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 30px 0 15px;
    position: relative;
    z-index: 1;
    flex-wrap: wrap;
}

.post-gate-button {
    display: inline-block;
    padding: 15px 35px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    min-width: 200px;
    text-align: center;
}

.post-gate-button-primary {
    background: white;
    color: #667eea;
    border: 2px solid white;
}

.post-gate-button-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    color: #667eea;
    text-decoration: none;
}

.post-gate-button-secondary {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 2px solid white;
}

.post-gate-button-secondary:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-2px);
    text-decoration: none;
    color: white;
}

/* Button color overrides per scheme */
.post-gate-green  .post-gate-button-primary { color: #11998e; }
.post-gate-purple .post-gate-button-primary { color: #8E2DE2; }
.post-gate-red    .post-gate-button-primary { color: #ee0979; }
.post-gate-dark   .post-gate-button-primary { color: #232526; }
.post-gate-gold   .post-gate-button-primary { color: #f2994a; }

/* -- Login link ----------------------------------------------------------- */
.post-gate-login {
    margin-top: 15px;
    position: relative;
    z-index: 1;
}

.post-gate-login a {
    color: white;
    opacity: 0.9;
    text-decoration: underline;
}

.post-gate-login a:hover {
    opacity: 1;
}

/* -- Modal ---------------------------------------------------------------- */
.post-gate-modal {
    display: none;
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    animation: post-gate-fadeIn 0.3s ease;
}

@keyframes post-gate-fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.post-gate-modal-content {
    position: relative;
    background: white;
    margin: 5% auto;
    padding: 0;
    width: 90%;
    max-width: 600px;
    border-radius: 12px;
    animation: post-gate-slideDown 0.3s ease;
}

@keyframes post-gate-slideDown {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.post-gate-modal-content .post-gate-container {
    margin: 0;
    padding: 0;
}

.post-gate-modal-close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    color: white;
    cursor: pointer;
    z-index: 2;
    background: rgba(0,0,0,0.2);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.post-gate-modal-close:hover {
    background: rgba(0,0,0,0.4);
    transform: rotate(90deg);
}

/* -- Responsive ----------------------------------------------------------- */
@media (max-width: 600px) {
    .post-gate-buttons {
        flex-direction: column;
        align-items: center;
    }
    .post-gate-button {
        width: 100%;
        max-width: 280px;
    }
    .post-gate-box {
        padding: 30px 20px;
    }
    .post-gate-heading {
        font-size: 24px;
    }
    .post-gate-subheading {
        font-size: 18px;
    }
}
