/**
 * AI Auto Blog — Frontend styles for CTA blocks.
 * Enqueued on single post pages where AIAB CTAs may appear.
 * These styles target the .aiab-cta-* classes produced by AIAB_CTA_Builder.
 */

/* Generic CTA container */
.aiab-cta {
    margin: 28px 0;
    padding: 22px 24px;
    border-radius: 10px;
    direction: rtl;
    text-align: right;
    position: relative;
    overflow: hidden;
}

.aiab-cta .aiab-cta__head {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.5;
    color: #1d2327;
}

.aiab-cta .aiab-cta__text {
    margin: 0 0 14px;
    font-size: 14px;
    line-height: 1.85;
    color: #2c3338;
}

.aiab-cta .wp-block-button__link {
    background: #2271b1;
    color: #fff !important;
    padding: 10px 22px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    display: inline-block;
    transition: background 0.18s ease, transform 0.15s ease;
}
.aiab-cta .wp-block-button__link:hover {
    background: #135e96;
    transform: translateY(-1px);
}

/* Template variants */
.aiab-cta--info-box {
    background: linear-gradient(135deg, #e9f5ff 0%, #f4faff 100%);
    border-right: 5px solid #2271b1;
    border-left: 1px solid #b5d4ee;
}
.aiab-cta--info-box .aiab-cta__head { color: #0a4b78; }

.aiab-cta--warning-box {
    background: linear-gradient(135deg, #fef9e7 0%, #fefce8 100%);
    border-right: 5px solid #f0c33c;
    border-left: 1px solid #f0d875;
}
.aiab-cta--warning-box .aiab-cta__head { color: #6f5006; }
.aiab-cta--warning-box .wp-block-button__link { background: #d68910; }
.aiab-cta--warning-box .wp-block-button__link:hover { background: #b9770e; }

.aiab-cta--tip-box {
    background: linear-gradient(135deg, #e7f5ed 0%, #f3fcf5 100%);
    border-right: 5px solid #00a32a;
    border-left: 1px solid #95d8a8;
}
.aiab-cta--tip-box .aiab-cta__head { color: #007337; }
.aiab-cta--tip-box .wp-block-button__link { background: #00a32a; }
.aiab-cta--tip-box .wp-block-button__link:hover { background: #008a23; }

.aiab-cta--newsletter {
    background: linear-gradient(135deg, #f6f0ff 0%, #faf7ff 100%);
    border-right: 5px solid #8c6cdf;
    border-left: 1px solid #c5b6e8;
}
.aiab-cta--newsletter .aiab-cta__head { color: #5b3faf; }
.aiab-cta--newsletter .wp-block-button__link { background: #8c6cdf; }
.aiab-cta--newsletter .wp-block-button__link:hover { background: #7558c4; }

.aiab-cta--button-card {
    background: linear-gradient(135deg, #fff4e6 0%, #fffaef 100%);
    border-right: 5px solid #e08600;
    border-left: 1px solid #f5b86e;
    text-align: center;
}
.aiab-cta--button-card .aiab-cta__head { color: #8a4d00; }
.aiab-cta--button-card .wp-block-buttons {
    justify-content: center;
    display: flex;
}
.aiab-cta--button-card .wp-block-button__link { background: #e08600; }
.aiab-cta--button-card .wp-block-button__link:hover { background: #c2730a; }

.aiab-cta--link-card {
    background: linear-gradient(135deg, #f0f4ff 0%, #f7f9ff 100%);
    border-right: 5px solid #5066d3;
    border-left: 1px solid #9fa9e0;
}
.aiab-cta--link-card .aiab-cta__head { color: #2d3f96; }
.aiab-cta--link-card .wp-block-button__link { background: #5066d3; }
.aiab-cta--link-card .wp-block-button__link:hover { background: #3d50b8; }

.aiab-cta--stats-callout {
    background: linear-gradient(135deg, #e7f5f4 0%, #f2fbfa 100%);
    border-right: 5px solid #008a8a;
    border-left: 1px solid #7fcdcd;
    text-align: center;
}
.aiab-cta--stats-callout .aiab-cta__head {
    color: #006666;
    font-size: 32px;
    font-weight: 800;
    line-height: 1.1;
}
.aiab-cta--stats-callout .aiab-cta__text {
    font-size: 16px;
    color: #1a4d4d;
}

/* Second-instance CTA in "both_intro_end" mode — slightly more subdued */
.aiab-cta--second {
    opacity: 0.92;
    margin-top: 40px;
}

/* Mobile tweaks */
@media (max-width: 600px) {
    .aiab-cta {
        padding: 16px 18px;
        margin: 20px 0;
    }
    .aiab-cta .aiab-cta__head { font-size: 16px; }
    .aiab-cta .aiab-cta__text { font-size: 13px; }
    .aiab-cta--stats-callout .aiab-cta__head { font-size: 24px; }
}
