/*
 * File: style.css
 * Path: \themes\kadence-child-theme-master\calculators\readability-calculator\style.css
 * (Complete CSS for the Readability Score Calculator tool)
 */

#readability-calculator-tool {
    max-width: 1150px; /* Adjusted to accommodate 1100px textarea + padding */
    width: 95%;
    margin: 2rem auto;
    padding: 2.5rem; /* Increased padding */
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    font-family: 'Segoe UI', Arial, sans-serif;
    text-align: center;
    color: #333;
}

#readability-calculator-tool h1 {
    text-align: center;
    margin-bottom: 2.5rem;
    font-size: 2.5rem;
    color: #333;
    font-weight: 600;
}

/* --- Input Section --- */
.input-section {
    margin-bottom: 2rem;
    text-align: left;
}

.input-section label {
    display: block;
    font-size: 1.2rem;
    color: #555;
    font-weight: 500;
    margin-bottom: 0.8rem;
}

#textInput {
    max-width: 1100px; /* Set maximum width */
    width: 100%; /* Ensure it still adapts to smaller screens */
    height: 200px; /* Reduced height as requested */
    min-height: 150px; /* Keep a minimum height for usability */
    padding: 1rem;
    border: 2px solid #ddd; /* Added border-color and increased thickness slightly */
    border-radius: 8px;
    font-size: 1rem;
    line-height: 1.5;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    resize: vertical; /* Allow vertical resizing */
}

#textInput:focus {
    border-color: #FF8A08; /* Orange border on focus */
    box-shadow: 0 0 0 3px rgba(255, 138, 8, 0.2);
    outline: none;
}

/* --- Action Buttons Container --- */
.action-buttons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 2.5rem; /* Space below buttons */
    flex-wrap: wrap;
}

/* --- Common Button Styles --- */
.action-btn {
    background-color: #FF8A08; /* Orange */
    color: white;
    border: none;
    padding: 0.9rem 2rem;
    border-radius: 25px; /* Pill-shaped */
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: 600;
    transition: background-color 0.25s ease, transform 0.1s ease, box-shadow 0.25s ease;
    min-width: 150px;
    box-shadow: 0 4px 8px rgba(255, 138, 8, 0.3);
}

.action-btn:hover {
    background-color: #e67e22; /* Darker orange */
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(255, 138, 8, 0.4);
}

.action-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(255, 138, 8, 0.2);
}

.action-btn:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* Specific button styles (if needed) */
.analyze-btn {
    /* Uses default orange */
}
.clear-btn {
    background-color: #6c757d; /* Grey for clear */
    box-shadow: 0 4px 8px rgba(108, 117, 125, 0.3);
}
.clear-btn:hover {
    background-color: #5a6268;
    box-shadow: 0 6px 12px rgba(108, 117, 125, 0.4);
}


/* --- Loading Indicator --- */
.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 2rem;
    color: #FF8A08;
    font-weight: bold;
    font-size: 1.1rem;
}

.spinner {
    border: 4px solid rgba(255, 138, 8, 0.2);
    border-top: 4px solid #FF8A08;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin-top: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* --- Error Message --- */
#errorMessage {
    color: #dc3545; /* Red for errors */
    margin-top: 1.5rem;
    font-weight: bold;
    font-size: 1.1rem;
    display: none;
    text-align: center;
}

/* --- Output Section --- */
.output-section {
    margin-top: 3rem;
    padding-top: 2.5rem; /* More space above the output results */
    border-top: 1px solid #eee; /* Separator line */
    text-align: left; /* Align results to the left */
}

.output-section h2 {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 1.5rem;
    text-align: left; /* Ensure sub-headings are left-aligned */
}

.scores-grid, .stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Responsive grid columns */
    gap: 1.5rem; /* Space between grid items */
    margin-bottom: 2.5rem;
}

.score-item, .stat-item {
    background-color: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Align text within item to left */
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.score-label, .stat-label {
    font-size: 1rem;
    color: #666;
    margin-bottom: 0.4rem;
}

.score-value {
    font-size: 1.8rem; /* Larger score values */
    font-weight: bold;
    color: #FF8A08; /* Orange score value */
}

.stat-value {
    font-size: 1.4rem; /* Slightly smaller than scores */
    font-weight: bold;
    color: #0073aa; /* WordPress blue for stats */
}

.suggestions-box {
    background-color: #f0f8ff; /* Light blue background */
    border: 1px solid #add8e6;
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 1.5rem;
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
    text-align: left; /* Align suggestions to left */
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.suggestions-box p {
    margin-bottom: 0.5rem;
}
.suggestions-box p:last-child {
    margin-bottom: 0;
}


/* Responsive adjustments */
@media (max-width: 768px) {
    #readability-calculator-tool h1 {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
    .action-buttons {
        flex-direction: column;
        gap: 1rem;
    }
    .action-btn {
        width: 100%;
        min-width: auto;
    }
    .scores-grid, .stats-grid {
        grid-template-columns: 1fr; /* Stack columns on smaller screens */
    }
}

@media (max-width: 480px) {
    #readability-calculator-tool {
        padding: 1.5rem;
    }
    #textInput {
        min-height: 200px;
    }
    .score-value {
        font-size: 1.5rem;
    }
    .stat-value {
        font-size: 1.2rem;
    }
}