/* 
 * Styles for SEO AI Checker 
 */

.seo-ai-checker-container {
    width: 100%;
    margin: 0;
    padding: 40px;
    background-color: #edf4fc;
    border-radius: 16px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #15123a;
    box-shadow: 0 4px 24px rgba(0,0,0,0.03);
    box-sizing: border-box;
}

.seo-ai-checker-container * {
    box-sizing: border-box;
}

.sac-header h3 {
    color: #15123a;
    font-size: 28px;
    margin-top: 0;
    margin-bottom: 10px;
    font-weight: 700;
    text-align: center;
}

.sac-header p {
    color: #4a5568;
    text-align: center;
    margin-bottom: 24px;
    font-size: 16px;
}

/* Flex Layout */
.sac-layout-wrapper {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.sac-input-section {
    flex: 1.5; /* Забирает больше ширины */
    min-width: 0;
}

.sac-result-section {
    flex: 1; /* Оставляем стандартную ширину */
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.sac-input-area {
    position: relative;
    margin-bottom: 20px;
}

#sac-text-input {
    width: 100%;
    min-height: 400px; /* Сильно увеличили высоту */
    padding: 20px;
    border: 1px solid #d2ddec;
    border-radius: 12px;
    font-family: inherit;
    font-size: 15px;
    line-height: 1.6;
    color: #15123a;
    resize: vertical;
    background: #ffffff;
    transition: border-color 0.3s;
}

#sac-text-input:focus {
    outline: none;
    border-color: #287cfc;
    box-shadow: 0 0 0 3px rgba(40, 124, 252, 0.1);
}

.sac-word-count {
    position: absolute;
    bottom: 12px;
    right: 16px;
    font-size: 13px;
    color: #718096;
    background: rgba(255,255,255,0.9);
    padding: 2px 6px;
    border-radius: 4px;
}

.sac-btn {
    display: block;
    width: 100%;
    padding: 16px;
    background-color: #287cfc;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.1s;
    text-align: center;
}

.sac-btn:hover {
    background-color: #1b62d3;
}

.sac-btn:active {
    transform: translateY(2px);
}

.sac-btn:disabled {
    background-color: #a0aec0;
    cursor: not-allowed;
}

/* Loading State */
#sac-loading {
    text-align: center;
    margin-top: 30px;
}

.sac-spinner {
    border: 4px solid rgba(40, 124, 252, 0.2);
    border-top: 4px solid #287cfc;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: sac-spin 1s linear infinite;
    margin: 0 auto 15px auto;
}

@keyframes sac-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Result Area */
#sac-result-area {
    margin-top: 0;
    background: #ffffff;
    border-radius: 12px;
    padding: 40px 30px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.sac-gauge-container {
    width: 180px;
    height: 180px;
    margin: 0 auto 20px auto;
}

.sac-circular-chart {
    display: block;
    margin: 0 auto;
    width: 180px !important;
    height: 180px !important;
    max-width: 100% !important;
    max-height: 250px;
}

.sac-circle-bg {
    fill: none;
    stroke: #edf2f7;
    stroke-width: 3.8;
}

.sac-circle {
    fill: none;
    stroke-width: 2.8;
    stroke-linecap: round;
    transition: stroke-dasharray 1.5s ease-out, stroke 0.5s;
    /* Default stroke color, updated via JS based on score */
    stroke: #287cfc; 
}

.sac-percentage {
    fill: #15123a;
    font-family: inherit;
    font-weight: 700;
    font-size: 11px;
    text-anchor: middle;
}

#sac-score-title {
    font-size: 22px;
    color: #15123a;
    margin-top: 0;
    margin-bottom: 10px;
}

.sac-reason {
    font-size: 16px;
    color: #4a5568;
    line-height: 1.5;
    margin-bottom: 30px;
    padding: 0 20px;
}

/* CTA Box */
.sac-cta-box {
    background-color: #edf4fc;
    border: 1px solid #d2ddec;
    padding: 24px;
    border-radius: 8px;
    text-align: center;
}

.sac-cta-box h4 {
    color: #15123a;
    font-size: 18px;
    margin-top: 0;
    margin-bottom: 10px;
}

.sac-cta-box p {
    color: #4a5568;
    font-size: 14px;
    margin-bottom: 20px;
}

.sac-cta-btn {
    display: inline-block;
    padding: 12px 24px;
    background-color: #15123a;
    color: #ffffff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: background-color 0.3s;
}

.sac-cta-btn:hover {
    background-color: #287cfc;
}

.sac-error {
    background-color: #fff5f5;
    color: #c53030;
    border: 1px solid #feb2b2;
    padding: 16px 20px;
    border-radius: 8px;
    text-align: center;
    margin-top: 20px;
    font-weight: 600;
    font-size: 15px;
    box-shadow: 0 4px 6px rgba(229, 62, 62, 0.1);
}

.sac-error::before {
    content: "⚠️ ";
    font-size: 18px;
    margin-right: 8px;
}

.sac-hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 850px) {
    .sac-layout-wrapper {
        flex-direction: column;
    }
    .sac-input-section, .sac-result-section {
        width: 100%;
        flex: none;
    }
}

@media (max-width: 600px) {
    .seo-ai-checker-container {
        padding: 20px;
        margin: 20px 10px;
    }
    
    .sac-header h3 {
        font-size: 22px;
    }
    
    #sac-result-area {
        padding: 20px;
    }
}
