/* Problem Form Page Styles */

/* Page Title */
.page-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--brand-neutral-900);
    margin: 0;
}

/* Section Titles */
.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--brand-neutral-900);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--brand-accent);
}

/* AI Generation Section */
.ai-section {
    background: white;
    border-radius: 16px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.ai-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--brand-accent);
    margin-bottom: 1rem;
}

.ai-section p {
    color: var(--brand-neutral-600);
    margin-bottom: 1.5rem;
}

/* AI Textarea */
.ai-textarea {
    width: 100%;
    min-height: 150px;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 1rem;
    resize: vertical;
    transition: all 0.2s ease;
}

.ai-textarea:focus {
    outline: none;
    border-color: var(--brand-accent);
    box-shadow: 0 0 0 3px rgba(240, 154, 138, 0.1);
}

/* AI Generate Button */
.btn-ai-generate {
    background: var(--brand-accent);
    border: none;
    color: white;
    padding: 0.875rem 2rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-ai-generate:hover {
    background: var(--brand-accent-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(240, 154, 138, 0.3);
}

.btn-ai-generate:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* AI Result Box */
.ai-result-box {
    margin-top: 2rem;
    background: #FAFAFA;
    border: 2px solid var(--brand-accent);
    border-radius: 12px;
    padding: 2rem;
    display: none;
}

.ai-result-box.show {
    display: block;
}

.ai-result-box h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.result-section {
    margin-top: 1.5rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
}

.result-section h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--brand-neutral-800);
    margin-bottom: 1rem;
}

/* Form Card */
.form-card {
    background: white;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
}

/* Form Labels */
.form-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--brand-neutral-800);
    margin-bottom: 0.5rem;
    display: block;
}

/* Form Controls */
.form-control {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--brand-accent);
    box-shadow: 0 0 0 3px rgba(240, 154, 138, 0.1);
}

/* Solution Groups */
.solution-group {
    background: #FAFAFA;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.solution-group h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--brand-accent);
    margin-bottom: 1rem;
}

/* Custom Button */
.btn-custom {
    background: var(--brand-accent);
    border: none;
    color: white;
    padding: 0.875rem 2rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-custom:hover {
    background: var(--brand-accent-dark);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(240, 154, 138, 0.3);
}

/* Outline Secondary Button */
.btn-outline-secondary {
    background: white;
    border: 2px solid var(--border-color);
    color: var(--brand-neutral-600);
    padding: 0.875rem 1.5rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-outline-secondary:hover {
    background: var(--brand-neutral-100);
    border-color: var(--brand-accent);
    color: var(--brand-accent);
}

.btn-outline-secondary.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Outline Primary Button (for mode toggle) */
.btn-outline-primary {
    background: white;
    border: 2px solid var(--brand-accent);
    color: var(--brand-accent);
    padding: 1rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-outline-primary:hover {
    background: rgba(240, 154, 138, 0.1);
    border-color: var(--brand-accent-dark);
    color: var(--brand-accent-dark);
}

.btn-check:checked + .btn-outline-primary {
    background: var(--brand-accent);
    color: white;
}

/* Outline Light Button */
.btn-outline-light {
    background: white;
    border: 2px solid var(--border-color);
    color: var(--brand-neutral-600);
    padding: 0.875rem 1.5rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-outline-light:hover {
    background: var(--brand-neutral-100);
    color: var(--brand-neutral-800);
}

/* Button Group */
.btn-group {
    display: flex;
    gap: 0;
}

.btn-group .btn-outline-primary {
    border-radius: 0;
}

.btn-group .btn-outline-primary:first-child {
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
}

.btn-group .btn-outline-primary:last-child {
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
}

/* Modal Styling */
.modal-content {
    border-radius: 16px;
    border: none;
}

.modal-header {
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
}

/* Generated Content Styling */
#generatedContent {
    margin-bottom: 1.5rem;
}

.generated-problem-section {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color-light);
}

.generated-problem-section h4 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--brand-accent);
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--brand-accent);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.generated-problem-section h4 i {
    font-size: 1.25rem;
}

.problem-detail-group {
    background: #FAFAFA;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.problem-detail-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--brand-neutral-700);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.problem-detail-text {
    font-size: 1rem;
    color: var(--brand-neutral-900);
    line-height: 1.6;
    margin: 0;
}

.generated-solutions-section {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color-light);
}

.generated-solutions-section h4 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--brand-accent);
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--brand-accent);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.generated-solutions-section h4 i {
    font-size: 1.25rem;
}

.generated-solution-card {
    background: #FAFAFA;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    transition: all 0.2s ease;
}

.generated-solution-card:hover {
    border-color: var(--brand-accent);
    box-shadow: 0 2px 8px rgba(240, 154, 138, 0.15);
}

.generated-solution-card h5 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--brand-accent);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.generated-solution-card h5 i {
    font-size: 1.125rem;
}

.solution-detail-item {
    margin-bottom: 0.75rem;
}

.solution-detail-item:last-child {
    margin-bottom: 0;
}

.solution-detail-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--brand-neutral-700);
    margin-bottom: 0.375rem;
}

.solution-detail-text {
    font-size: 0.9375rem;
    color: var(--brand-neutral-800);
    line-height: 1.5;
    margin: 0 0 0.5rem 0;
}

/* Promotional Text Section */
#promoContent {
    margin-top: 1rem;
}

.promo-section {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color-light);
}

.promo-section h6 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--brand-neutral-700);
    margin-bottom: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.promo-text {
    background: #FAFAFA;
    padding: 0.875rem;
    border-radius: 6px;
    font-size: 0.9375rem;
    color: var(--brand-neutral-800);
    line-height: 1.6;
    white-space: pre-wrap;
}

.promo-text.rtl {
    direction: rtl;
    text-align: right;
}

/* Action Buttons Container */
.generated-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ai-section,
    .form-card {
        padding: 1.5rem;
    }

    .page-title {
        font-size: 1.5rem;
    }

    .section-title {
        font-size: 1.125rem;
    }

    .solution-group {
        padding: 1rem;
    }

    .btn-custom,
    .btn-outline-secondary,
    .btn-ai-generate {
        padding: 0.75rem 1.5rem;
        font-size: 0.9375rem;
    }

    .generated-problem-section,
    .generated-solutions-section {
        padding: 1rem;
    }

    .generated-solution-card {
        padding: 1rem;
    }

    .generated-actions {
        flex-direction: column;
    }

    .generated-actions .btn {
        width: 100%;
    }
}
