/**
 * Veistin Ferramentas — Public Styles v2.0
 * 
 * Estilos para iframes, CTAs, cross-links e loading states.
 * Compatível com tema Veistin e WordPress padrão.
 */

/* ============================================================
   IFRAME CONTAINER
   ============================================================ */
.vf-page-ferramenta {
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
}

.vf-tool-wrapper {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden;
}

.vf-iframe {
    width: 100%;
    border: none;
    display: block;
    transition: height 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    background: #ffffff;
}

.vf-iframe.vf-loaded {
    opacity: 1;
}

/* Loading state */
.vf-iframe-loader {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 500px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    z-index: 5;
    transition: opacity 0.3s ease;
}

.vf-loader-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e5e7eb;
    border-top-color: #035cd4;
    border-radius: 50%;
    animation: vf-spin 0.8s linear infinite;
    margin-bottom: 12px;
}

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

.vf-iframe-loader p {
    color: #6b7280;
    font-size: 14px;
    font-family: 'Inter', -apple-system, sans-serif;
    margin: 0;
}

/* ============================================================
   ADSENSE SLOTS
   ============================================================ */
.vf-adsense-slot {
    max-width: 1200px;
    margin: 16px auto;
    padding: 0 16px;
    text-align: center;
}

.vf-adsense-before {
    margin-bottom: 8px;
}

.vf-adsense-after {
    margin-top: 8px;
}

/* ============================================================
   CROSS-LINKS (Outras ferramentas)
   ============================================================ */
.vf-cross-links {
    max-width: 1200px;
    margin: 32px auto;
    padding: 0 16px;
}

.vf-cross-links h3 {
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 20px;
    font-family: 'Inter', -apple-system, sans-serif;
}

.vf-cross-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.vf-cross-link-card {
    display: block;
    padding: 24px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    text-decoration: none;
    transition: all 0.2s ease;
}

.vf-cross-link-card:hover {
    border-color: #d1d5db;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

.vf-cross-link-card h4 {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 8px;
    font-family: 'Inter', -apple-system, sans-serif;
}

.vf-cross-link-card p {
    font-size: 13px;
    color: #6b7280;
    margin: 0 0 12px;
    line-height: 1.5;
}

.vf-cross-link-arrow {
    font-size: 13px;
    font-weight: 600;
    font-family: 'Inter', -apple-system, sans-serif;
}

/* ============================================================
   CTA STYLES — 4 variantes
   ============================================================ */

/* CTA Card */
.vf-cta-card {
    display: block;
    padding: 24px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    text-decoration: none;
    transition: all 0.2s ease;
    margin: 24px 0;
}

.vf-cta-card:hover {
    border-color: #d1d5db;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

.vf-cta-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 12px;
}

.vf-cta-card h4 {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 8px;
    font-family: 'Inter', -apple-system, sans-serif;
}

.vf-cta-card p {
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 16px;
    line-height: 1.6;
}

.vf-cta-card-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: 8px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Inter', -apple-system, sans-serif;
    text-decoration: none;
    transition: opacity 0.2s;
}

.vf-cta-card-btn:hover {
    opacity: 0.9;
    color: #ffffff;
}

/* CTA Banner */
.vf-cta-banner {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 24px;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s ease;
    margin: 24px 0;
    color: #ffffff;
}

.vf-cta-banner:hover {
    opacity: 0.95;
    transform: translateY(-1px);
    color: #ffffff;
}

.vf-cta-banner-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.vf-cta-banner-content {
    flex: 1;
}

.vf-cta-banner h4 {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 4px;
    color: #ffffff;
    font-family: 'Inter', -apple-system, sans-serif;
}

.vf-cta-banner p {
    font-size: 13px;
    margin: 0;
    opacity: 0.9;
    color: #ffffff;
}

.vf-cta-banner-arrow {
    font-size: 20px;
    flex-shrink: 0;
    opacity: 0.7;
}

/* CTA Compact */
.vf-cta-compact {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    border-radius: 10px;
    border: 2px solid;
    background: transparent;
    text-decoration: none;
    transition: all 0.2s ease;
    margin: 16px 0;
}

.vf-cta-compact:hover {
    transform: translateY(-1px);
}

.vf-cta-compact-icon {
    font-size: 20px;
}

.vf-cta-compact span {
    font-size: 14px;
    font-weight: 600;
    font-family: 'Inter', -apple-system, sans-serif;
}

.vf-cta-compact-arrow {
    font-size: 16px;
    opacity: 0.6;
}

/* CTA Minimal */
.vf-cta-minimal {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    text-decoration: none;
    transition: all 0.2s ease;
    margin: 12px 0;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Inter', -apple-system, sans-serif;
}

.vf-cta-minimal:hover {
    opacity: 0.8;
}

.vf-cta-minimal-arrow {
    transition: transform 0.2s;
}

.vf-cta-minimal:hover .vf-cta-minimal-arrow {
    transform: translateX(3px);
}

/* CTA Hub (3 ferramentas juntas) */
.vf-cta-hub {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    margin: 24px 0;
}

.vf-cta-hub-item {
    display: block;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    text-decoration: none;
    transition: all 0.2s ease;
    text-align: center;
}

.vf-cta-hub-item:hover {
    border-color: #d1d5db;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

.vf-cta-hub-item-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin: 0 auto 12px;
}

.vf-cta-hub-item h4 {
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 6px;
    font-family: 'Inter', -apple-system, sans-serif;
}

.vf-cta-hub-item p {
    font-size: 12px;
    color: #6b7280;
    margin: 0 0 12px;
    line-height: 1.5;
}

.vf-cta-hub-item-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Inter', -apple-system, sans-serif;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .vf-cross-links-grid {
        grid-template-columns: 1fr;
    }
    
    .vf-cta-banner {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    
    .vf-cta-banner-arrow {
        display: none;
    }
    
    .vf-cta-hub {
        grid-template-columns: 1fr;
    }
    
    .vf-tool-wrapper {
        padding: 0;
    }
    
    .vf-iframe {
        min-height: 600px;
    }
}

@media (min-width: 769px) {
    .vf-iframe {
        min-height: 800px;
    }
}

/* ============================================================
   PRINT STYLES
   ============================================================ */
@media print {
    .vf-adsense-slot,
    .vf-cross-links,
    .vf-cta-card,
    .vf-cta-banner,
    .vf-cta-compact,
    .vf-cta-minimal,
    .vf-cta-hub {
        display: none !important;
    }
}
