/**
 * AICT CRO Components
 * Styles for: animated search, category pills, PRO badges, bookmarks,
 *             lead capture banner, homepage pricing section
 * @since 1.16.0
 */

/* ====================== Animated Search Placeholder ====================== */
.aict-homepage .hero-search {
    max-width: 600px;
    margin: 0 auto 32px;
    position: relative;
}

.aict-homepage .hero-search .search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0;
    opacity: 0.8;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.aict-homepage .hero-search .search-icon svg {
    width: 22px;
    height: 22px;
    stroke: rgba(255,255,255,0.85);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.aict-homepage .hero-search input {
    width: 100%;
    padding: 18px 24px 18px 52px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 16px;
    font-size: 17px;
    background: rgba(255,255,255,0.12);
    color: #fff;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    outline: none;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.aict-homepage .hero-search input::placeholder {
    color: rgba(255,255,255,0.6);
    transition: opacity 0.15s;
}

.aict-homepage .hero-search input:focus {
    border-color: rgba(255,255,255,0.6);
    background: rgba(255,255,255,0.2);
    box-shadow: 0 0 0 4px rgba(255,255,255,0.1);
}

/* Typing cursor for animated placeholder */
.aict-search-typed {
    position: absolute;
    left: 52px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 17px;
    color: rgba(255,255,255,0.6);
    pointer-events: none;
    white-space: nowrap;
    overflow: hidden;
}

.aict-search-typed .aict-cursor {
    display: inline-block;
    width: 2px;
    height: 1.1em;
    background: rgba(255,255,255,0.7);
    margin-left: 1px;
    vertical-align: text-bottom;
    animation: aict-blink 0.8s step-end infinite;
}

@keyframes aict-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Hide typed overlay when input has content */
.aict-homepage .hero-search input:focus + .aict-search-typed,
.aict-homepage .hero-search input.has-value + .aict-search-typed {
    display: none;
}

/* ====================== Category Pills (Horizontal Scroll) ====================== */
.aict-category-pills-wrap {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    padding: 0 4px;
}

.aict-category-pills {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding: 8px 4px 12px;
    scrollbar-width: none;
    justify-content: center;
    flex-wrap: wrap;
}

.aict-category-pills::-webkit-scrollbar {
    display: none;
}

.aict-pill {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 50px;
    font-size: 0.9rem;
    color: #334155;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
    cursor: pointer;
}

.aict-pill:hover {
    background: #6366f1;
    color: #fff;
    border-color: #6366f1;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99,102,241,0.3);
}

.aict-pill .pill-count {
    font-size: 0.75rem;
    opacity: 0.6;
    font-weight: 400;
}

.aict-pill:hover .pill-count {
    opacity: 0.85;
}

/* ====================== PRO Badge ====================== */
.aict-pro-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 10px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border-radius: 4px;
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    box-shadow: 0 2px 6px rgba(245,158,11,0.3);
}

.aict-pro-badge svg {
    width: 10px;
    height: 10px;
    fill: #fff;
}

.aict-tool-card {
    position: relative;
}

/* ====================== Bookmark Icon ====================== */
.aict-bookmark-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(241,245,249,0.9);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 3;
    padding: 0;
}

.aict-bookmark-btn:hover {
    background: #fee2e2;
    transform: scale(1.1);
}

.aict-bookmark-btn svg {
    width: 16px;
    height: 16px;
    stroke: #94a3b8;
    fill: none;
    stroke-width: 2;
    transition: all 0.2s;
}

.aict-bookmark-btn:hover svg {
    stroke: #ef4444;
    fill: #fecaca;
}

.aict-bookmark-btn.bookmarked svg {
    stroke: #ef4444;
    fill: #ef4444;
}

/* When card has PRO badge, shift bookmark left */
.aict-tool-card .aict-pro-badge + .aict-bookmark-btn,
.aict-tool-card .aict-bookmark-btn.has-pro {
    right: auto;
    left: 12px;
}

/* ====================== Lead Capture Banner ====================== */
.aict-lead-capture {
    padding: 64px 20px;
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #3730a3 100%);
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.aict-lead-capture::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 200%;
    background: radial-gradient(circle, rgba(99,102,241,0.15) 0%, transparent 70%);
    pointer-events: none;
}

.aict-lead-capture-inner {
    max-width: 640px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.aict-lead-capture h2 {
    font-size: 1.85rem;
    font-weight: 800;
    margin: 0 0 10px;
    line-height: 1.25;
}

.aict-lead-capture .lead-subtitle {
    font-size: 1.05rem;
    color: #c7d2fe;
    margin: 0 0 28px;
    line-height: 1.5;
}

.aict-lead-form {
    display: flex;
    gap: 12px;
    max-width: 480px;
    margin: 0 auto 16px;
}

.aict-lead-form input[type="email"] {
    flex: 1;
    padding: 14px 18px;
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 10px;
    font-size: 1rem;
    background: rgba(255,255,255,0.1);
    color: #fff;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.aict-lead-form input[type="email"]::placeholder {
    color: rgba(255,255,255,0.5);
}

.aict-lead-form input[type="email"]:focus {
    border-color: rgba(255,255,255,0.5);
}

.aict-lead-form button {
    padding: 14px 28px;
    background: linear-gradient(135deg, #6366f1, #818cf8);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    white-space: nowrap;
}

.aict-lead-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(255,107,53,0.4);
}

.aict-lead-privacy {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.45);
    margin: 0;
}

.aict-lead-success {
    display: none;
    padding: 16px;
    background: rgba(34,197,94,0.15);
    border: 1px solid rgba(34,197,94,0.3);
    border-radius: 10px;
    color: #86efac;
    font-weight: 600;
}

/* ====================== Homepage Pricing Section ====================== */
.aict-homepage-pricing {
    padding: 64px 20px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

.aict-homepage-pricing .pricing-inner {
    max-width: 820px;
    margin: 0 auto;
}

.aict-homepage-pricing .pricing-header {
    text-align: center;
    margin-bottom: 40px;
}

.aict-homepage-pricing .pricing-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 8px;
}

.aict-homepage-pricing .pricing-header p {
    font-size: 1.05rem;
    color: #64748b;
    margin: 0;
}

.aict-pricing-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
}

.aict-pricing-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 32px;
    position: relative;
}

.aict-pricing-card.featured {
    border: 2px solid #6366f1;
    box-shadow: 0 8px 32px rgba(99,102,241,0.15);
}

.aict-pricing-card .popular-badge {
    position: absolute;
    top: -13px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.aict-pricing-card .plan-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 4px;
}

.aict-pricing-card .plan-price {
    font-size: 2.5rem;
    font-weight: 800;
    color: #1e293b;
    margin: 0 0 4px;
    line-height: 1.2;
}

.aict-pricing-card .plan-price span {
    font-size: 1rem;
    font-weight: 400;
    color: #64748b;
}

.aict-pricing-card .plan-desc {
    font-size: 0.9rem;
    color: #64748b;
    margin: 0 0 20px;
}

.aict-pricing-card .plan-features {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
}

.aict-pricing-card .plan-features li {
    padding: 8px 0;
    font-size: 0.925rem;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #f1f5f9;
}

.aict-pricing-card .plan-features li:last-child {
    border-bottom: none;
}

.aict-pricing-card .plan-features li .check {
    color: #22c55e;
    font-weight: 700;
    flex-shrink: 0;
}

.aict-pricing-card .plan-features li .cross {
    color: #cbd5e1;
    font-weight: 700;
    flex-shrink: 0;
}

.aict-pricing-card .plan-cta {
    display: block;
    text-align: center;
    padding: 14px 24px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    transition: transform 0.15s, box-shadow 0.15s;
}

.aict-pricing-card .plan-cta:hover {
    transform: translateY(-2px);
}

.aict-pricing-card .plan-cta.cta-free {
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #e2e8f0;
}

.aict-pricing-card .plan-cta.cta-free:hover {
    background: #e2e8f0;
}

.aict-pricing-card .plan-cta.cta-pro {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
}

.aict-pricing-card .plan-cta.cta-pro:hover {
    box-shadow: 0 4px 16px rgba(99,102,241,0.4);
}

.aict-pricing-guarantee {
    text-align: center;
    margin-top: 20px;
    font-size: 0.85rem;
    color: #64748b;
}

/* ====================== Signup Modal (Lead Capture Soft-Gate) ====================== */
.aict-signup-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: aict-fade-in 0.2s ease;
}

@keyframes aict-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.aict-signup-modal {
    background: #fff;
    border-radius: 16px;
    padding: 40px 32px;
    max-width: 420px;
    width: 100%;
    text-align: center;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    animation: aict-slide-up 0.25s ease;
}

@keyframes aict-slide-up {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.aict-signup-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
}

.aict-signup-modal-close:hover {
    color: #475569;
}

.aict-signup-modal h3 {
    font-size: 1.35rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 8px;
}

.aict-signup-modal p {
    font-size: 0.95rem;
    color: #64748b;
    margin: 0 0 20px;
    line-height: 1.5;
}

.aict-signup-modal .signup-cta {
    display: block;
    padding: 14px 24px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 12px;
    transition: transform 0.15s;
}

.aict-signup-modal .signup-cta:hover {
    transform: translateY(-2px);
}

.aict-signup-modal .signup-signin {
    font-size: 0.85rem;
    color: #94a3b8;
}

.aict-signup-modal .signup-signin a {
    color: #6366f1;
    text-decoration: none;
    font-weight: 600;
}

/* ====================== Responsive ====================== */
@media (max-width: 768px) {
    .aict-pricing-cards {
        grid-template-columns: 1fr;
    }

    .aict-lead-form {
        flex-direction: column;
    }

    .aict-lead-capture h2 {
        font-size: 1.5rem;
    }

    .aict-category-pills {
        justify-content: flex-start;
        flex-wrap: nowrap;
    }

    .aict-homepage-pricing {
        padding: 48px 16px;
    }
}

@media (max-width: 480px) {
    .aict-lead-capture {
        padding: 48px 16px;
    }
}

/* ====================== Post-Result CTA ====================== */
.aict-post-result-cta {
    margin-top: 16px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border: 1px solid #334155;
    border-radius: 10px;
    text-align: center;
}
.aict-post-result-cta p {
    color: #cbd5e1;
    margin: 0 0 12px;
    font-size: 14px;
}
.aict-post-result-cta .aict-cta-btn {
    display: inline-block;
    padding: 10px 24px;
    background: #4f46e5;
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: background 0.2s;
}
.aict-post-result-cta .aict-cta-btn:hover {
    background: #4338ca;
}
.aict-post-result-cta-upgrade {
    border-color: #4f46e5;
    background: linear-gradient(135deg, #312e81, #1e1b4b);
}
