/* Test Generator Interface */
.test-generator-interface {
    margin-bottom: 2rem;
}

/* Main Card Container */
.main-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.main-card:hover {
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.15);
}

/* Two Column Layout */
.card-columns {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    min-height: 600px;
}

@media (min-width: 768px) {
    .card-columns {
        grid-template-columns: 1fr 1fr;
        min-height: 700px;
    }
    
    .left-column,
    .right-column {
        min-height: 700px;
    }
}

/* Left Column */
.left-column {
    display: flex;
    flex-direction: column;
    border-right: 1px solid #e5e7eb;
    background: #fafbfc;
}

@media (max-width: 767px) {
    .left-column {
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
    }
}

/* Right Column */
.right-column {
    display: flex;
    flex-direction: column;
    background: #ffffff;
}

/* Section Styles */
.config-section,
.input-section,
.output-section {
    display: flex;
    flex-direction: column;
}

.config-section {
    border-bottom: 1px solid #e5e7eb;
    background: #ffffff;
    flex-shrink: 0;
}

.input-section {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.output-section {
    height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* Section Headers */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    min-height: 64px;
    box-sizing: border-box;
}

.section-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
    color: #ffffff;
}

.section-actions {
    display: flex;
    gap: 0.5rem;
}

.action-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 8px;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.action-icon-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.action-icon-btn .icon {
    font-size: 1.125rem;
}

/* Configuration Content */
.config-content {
    padding: 1.5rem;
}

.config-group {
    margin-bottom: 1.5rem;
}

.config-group:last-child {
    margin-bottom: 0;
}

.config-label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 500;
    color: #374151;
    font-size: 0.875rem;
}

.label-text {
    display: block;
}

.config-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: #ffffff;
    font-size: 0.9375rem;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23374151' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.config-select:hover {
    border-color: #667eea;
}

.config-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Coverage Options */
.coverage-options {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.coverage-option {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
    min-width: 80px;
    justify-content: center;
}

.coverage-option:hover {
    border-color: #667eea;
    background: #f3f4f6;
}

.coverage-option input[type="radio"] {
    margin: 0;
    margin-right: 0.5rem;
    cursor: pointer;
}

.coverage-option input[type="radio"]:checked + .option-label {
    color: #667eea;
    font-weight: 500;
}

.coverage-option:has(input[type="radio"]:checked) {
    border-color: #667eea;
    background: #ede9fe;
}

.option-label {
    font-size: 0.875rem;
    color: #6b7280;
    cursor: pointer;
    transition: color 0.2s ease;
}

/* Input Section */
.input-section {
    padding: 1.5rem;
}

.editor-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.code-editor {
    width: 100%;
    flex: 1;
    min-height: 300px;
    height: 100%;
    padding: 1.25rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: #ffffff;
    
    font-size: 0.875rem;
    line-height: 1.6;
    color: #374151;
    resize: vertical;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.code-editor:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.code-editor::placeholder {
    color: #9ca3af;
}

.editor-footer {
    margin-top: 0.75rem;
    display: flex;
    justify-content: flex-end;
}

.char-count {
    font-size: 0.75rem;
    color: #6b7280;
}

/* Action Bar */
.action-bar {
    padding: 1.5rem;
    border-top: 1px solid #e5e7eb;
    background: #ffffff;
    flex-shrink: 0;
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #ffffff;
    color: #374151;
    white-space: nowrap;
}

.action-btn:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    transform: translateY(-1px);
}

.action-btn:active {
    transform: translateY(0);
}

.action-btn .btn-icon {
    font-size: 1rem;
}

.action-btn-secondary {
    background: #f9fafb;
    border-color: #e5e7eb;
}

.action-btn-secondary:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.generate-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex: 1;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.generate-btn:active {
    transform: translateY(0);
}

.generate-btn .btn-icon {
    font-size: 1.25rem;
}

.generate-btn .btn-text {
    font-weight: 600;
}

/* Output Section */
.output-container {
    flex: 1;
    min-height: 0;
    overflow: auto;
    background: #1e293b;
    position: relative;
    display: flex;
    flex-direction: column;
}

.empty-output {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 400px;
    padding: 2rem;
    text-align: center;
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-text {
    color: #94a3b8;
    font-size: 0.9375rem;
    max-width: 300px;
}

.test-output {
    padding: 1.5rem;
    height: 100%;
    overflow: auto;
}

.test-output pre {
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
}

.test-output code {
    display: block;
    
    font-size: 0.875rem;
    line-height: 1.6;
    color: #e2e8f0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Loading State */
.generate-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.generate-btn.loading {
    position: relative;
    color: transparent;
}

.generate-btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Scrollbar Styling */
.output-container::-webkit-scrollbar,
.test-output::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.output-container::-webkit-scrollbar-track,
.test-output::-webkit-scrollbar-track {
    background: #0f172a;
}

.output-container::-webkit-scrollbar-thumb,
.test-output::-webkit-scrollbar-thumb {
    background: #475569;
    border-radius: 4px;
}

.output-container::-webkit-scrollbar-thumb:hover,
.test-output::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* Success Animation */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.test-output {
    animation: slideIn 0.3s ease;
}

/* Responsive Adjustments */
@media (max-width: 767px) {
    .main-card {
        border-radius: 12px;
    }

    .card-columns {
        min-height: auto;
    }

    .config-content {
        padding: 1.25rem;
    }

    .input-section {
        padding: 1.25rem;
    }

    .code-editor {
        min-height: 200px;
    }

    .action-bar {
        padding: 1.25rem;
        flex-direction: column;
        gap: 0.5rem;
    }

    .action-btn {
        width: 100%;
    }

    .generate-btn {
        width: 100%;
    }

    .empty-output {
        min-height: 300px;
    }
}

@media (min-width: 1024px) {
    .card-columns {
        min-height: 800px;
    }
}
