/*
 * File: style.css
 * Path: \themes\kadence-child-theme-master\tools\case-study-generator\style.css
 * (Updated CSS for the Case Study / Testimonial Generator tool - Targeting H2 heading)
 */

#case-study-generator-tool {
    max-width: 900px;
    width: 95%;
    margin: 2rem auto;
    padding: 2.5rem;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    font-family: 'Segoe UI', Arial, sans-serif;
    color: #333;
    text-align: center; /* Center main elements */
}

#case-study-generator-tool h2 { /* Changed from H1 to H2 */
    text-align: center;
    margin-bottom: 2.5rem;
    font-size: 2.5rem; /* Retain large font size */
    color: #333;
    font-weight: 600;
}

/* --- Input Section --- */
.input-section {
    margin-bottom: 2rem;
    text-align: left; /* Align labels/inputs to left */
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 1.1rem;
    color: #555;
    font-weight: 500;
    margin-bottom: 0.6rem;
}

.form-group input[type="text"],
.form-group textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid #ddd;
    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;
}

.form-group textarea {
    resize: vertical; /* Allow vertical resizing */
    min-height: 80px; /* Minimum height for text areas */
}

.form-group input[type="text"]:focus,
.form-group textarea:focus {
    border-color: #FF8A08;
    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;
    flex-wrap: wrap;
}

/* --- Common Button Styles (reused from other tools) --- */
.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 */
.generate-btn {
    /* Uses default orange */
}
.copy-btn {
    background-color: #007bff; /* Blue for copy */
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}
.copy-btn:hover {
    background-color: #0056b3;
    box-shadow: 0 6px 12px rgba(0, 123, 255, 0.4);
}
.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;
    border-top: 1px solid #eee;
    text-align: left; /* Align output text to the left */
}

.output-section h2 { /* Targeting H2 here too */
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 1.5rem;
    text-align: left;
}

.generated-text {
    background-color: #f8f8f8;
    border: 1px dashed #ddd;
    border-radius: 8px;
    padding: 1.5rem;
    font-family: 'Courier New', monospace; /* Monospace for code/formatted text */
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
    white-space: pre-wrap; /* Preserve whitespace and wrap lines */
    word-wrap: break-word; /* Break long words */
    max-height: 400px; /* Max height with scroll */
    overflow-y: auto;
    margin-bottom: 1.5rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #case-study-generator-tool h2 { /* Targeting H2 */
        font-size: 2rem;
        margin-bottom: 2rem;
    }
    .action-buttons {
        flex-direction: column;
        gap: 1rem;
    }
    .action-btn {
        width: 100%;
        min-width: auto;
    }
    .form-group input[type="text"],
    .form-group textarea {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    #case-study-generator-tool {
        padding: 1.5rem;
    }
    .form-group textarea {
        min-height: 60px;
    }
}