/**
 * Playground Styles - v0.1.5
 * 3-Column Architecture: Original HTML | Layout & Content Objects | Created HTML
 */

/* Override container max-width for playground */
.container {
    max-width: none !important;
    padding: 0 1rem;
}

/* Page Structure */
.page-header {
    text-align: center;
    margin-bottom: 1.5rem;
    padding: 1.5rem 1rem 1rem 1rem;
    background: white;
    border-radius: 12px;
    position: relative;
}

.page-header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.page-header .subtitle {
    font-size: 1rem;
    color: #6b7280;
}

/* Version Badge */
.version-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.025em;
}

/* NEW: 3-Column Grid Layout */
.playground-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
    height: calc(100vh - 240px); /* More vertical space - reduced from 280px */
    min-height: 600px;
}

/* Column Styling */
.column {
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    overflow: hidden;
}

.column-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e5e7eb;
}

.column-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

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

/* Column Content Area */
.column-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Special: Middle Column has TWO views */
.middle-column .column-content {
    display: grid;
    grid-template-rows: 1fr 1fr;
    gap: 1rem;
}

.middle-view {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.middle-view-header {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.middle-view-content {
    flex: 1;
    overflow: auto;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1rem;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
}

/* Input Areas */
.input-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.input-controls {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    align-items: center;
}

.input-controls select {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
}

.input-textarea {
    flex: 1;
    padding: 1rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
    resize: none;
    overflow: auto;
}

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

.character-count {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.5rem;
    text-align: right;
}

/* Output Areas */
.output-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.output-content {
    flex: 1;
    overflow: auto;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1rem;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
}

/* Transform Buttons (between columns) */
.transform-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1rem 1.5rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    z-index: 10;
}

.transform-button:hover {
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.transform-button:active {
    transform: translateY(-50%) scale(0.98);
}

.transform-left {
    right: -2.5rem;
}

.transform-right {
    right: -2.5rem;
}

/* Buttons */
.btn-small {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.btn-secondary:hover {
    background: #e5e7eb;
}

.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

/* Status Messages */
.status-message {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.status-success {
    background: #d1fae5;
    color: #065f46;
    border-left: 4px solid #10b981;
}

.status-error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

.status-loading {
    background: #dbeafe;
    color: #1e40af;
    border-left: 4px solid #3b82f6;
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #9ca3af;
    text-align: center;
    padding: 2rem;
}

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

.empty-state-text {
    font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 1200px) {
    .playground-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        height: auto;
        min-height: 0;
    }

    .column {
        min-height: 400px;
    }

    .transform-button {
        position: static;
        transform: none;
        width: 100%;
        margin: 1rem 0;
    }

    .transform-button:hover {
        transform: scale(1.02);
    }
}

/* Footer */
.footer {
    text-align: center;
    padding: 1rem;
    font-size: 0.875rem;
    color: #6b7280;
}

/* Debug Panel */
.debug-panel {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: white;
    border: 2px solid #667eea;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    min-width: 250px;
}

.debug-panel-header {
    font-weight: 600;
    color: #667eea;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.debug-panel-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.debug-panel-buttons button {
    width: 100%;
    text-align: left;
    font-size: 0.8rem;
    padding: 0.5rem 0.75rem;
}