/* styles.css */
@font-face {
    font-family: 'whitrabt';
    src: url('/apps/_shared/fonts/whitrabt.ttf') format('truetype');
}

body {
    font-family: 'whitrabt', monospace;
    background-color: #f0f5f9;
    color: #333;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

header {
    background-color: #101215;
    color: white;
    width: 100%;
    padding: 1rem 0;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

h1 {
    margin: 0;
    font-size: 1.8rem;
}

.container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 1rem;
    box-sizing: border-box;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.tabs {
    display: flex;
    margin-bottom: 1rem;
    border-bottom: 2px solid #e5e7eb;
}

.tab {
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    border: none;
    background: none;
    font-size: 1rem;
    font-weight: 600;
    color: #64748b;
}

.tab.active {
    color: #101215;
    border-bottom: 2px solid #101215;
    margin-bottom: -2px;
}

.tab.active:hover {
    color: white;
}

.tab-content {
    display: none;
    flex: 1;
}

.tab-content.active {
    display: flex;
    flex-direction: column;
}

.content-area {
    background-color: white;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
}

.canvas-container {
    overflow: auto;
    margin-bottom: 1rem;
    margin: 0 auto;
}

canvas {
    border: 1px solid #ddd;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.notification {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(16, 185, 129, 0.9);
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    z-index: 100;
    pointer-events: none;
}

.notification.show {
    opacity: 1;
}

.controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin-top: 1rem;
}

button {
    background-color: #101215;
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.2s;
    font-family: 'whitrabt', monospace;
}

button:hover {
    background-color: #101215;
    color: white;
}

.apply-btn {
    background-color: #10b981;
    width: 100%;
    margin-top: 1rem;
}

.apply-btn:hover {
    background-color: #059669;
}

.editors {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    height: 100%;
}

.editor-section {
    flex: none;
    display: flex;
    flex-direction: column;
}

.editor-section h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: #101215;
    font-size: 1rem;
}

.code-editor {
    width: 100%;
    min-height: 150px;
    max-height: 80vh;
    /* optional cap so it doesn’t grow off-screen */
    height: auto;
    flex: none;

    /* allow user-drag resize */
    resize: vertical;
    overflow: auto;

    font-family: monospace;
    font-size: 0.9rem;
    background-color: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    padding: 0.75rem;
    box-sizing: border-box;
}

footer {
    width: 100%;
    background-color: #101215;
    color: white;
    text-align: center;
    padding: 0.5rem 0;
    font-size: 0.8rem;
    font-family: monospace;
}

@media (max-width: 768px) {
    .container {
        padding: 0.5rem;
    }

    h1 {
        font-size: 1.5rem;
    }

    .tab {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    button {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
}