/* TextToFlow Main Wrapper and Design Styles */
.ttf-container {
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: #222222;
    background-color: #f5f6f8;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    margin: 20px 0;
    width: 100%;
}

*, *::before, *::after {
    box-sizing: border-box;
}

/* Header Bar Styling */
.ttf-header {
    background-color: #eef0f3;
    padding: 15px;
    border-bottom: 2px solid #e0e2e6;
    text-align: center;
}

.ttf-title {
    margin: 0;
    padding: 0;
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    letter-spacing: 0.5px;
}

/* Split Workspace layout */
.ttf-workspace {
    display: table;
    width: 100%;
    table-layout: fixed;
    background-color: #f5f6f8;
}

.ttf-panel-left, .ttf-panel-right {
    display: table-cell;
    vertical-align: top;
    padding: 20px;
}

.ttf-panel-left {
    width: 35%;
    border-right: 1px solid #e0e2e6;
    background-color: #ffffff;
}

.ttf-panel-right {
    width: 65%;
    background-color: #f5f6f8;
    position: relative;
}

/* Textarea Input styling */
.ttf-section-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #555555;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#ttf-input-text {
    width: 100%;
    height: 320px;
    padding: 12px;
    border: 1px solid #cccccc;
    border-radius: 4px;
    font-family: "Courier New", Courier, monospace;
    font-size: 13px;
    line-height: 1.5;
    color: #222222;
    background-color: #fafafa;
    resize: vertical;
    outline: none;
}

#ttf-input-text:focus {
    border-color: #2ecc71;
    box-shadow: 0 0 5px rgba(46, 204, 113, 0.3);
}

/* Controls & Buttons Layout */
.ttf-controls {
    margin-top: 15px;
    margin-bottom: 15px;
}

/* Light Neon Green Primary Theme Button */
.ttf-btn {
    background-color: #39ff14;
    color: #1a1a1a;
    border: 1px solid #2ae000;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 8px;
    margin-bottom: 8px;
    transition: background-color 0.2s, transform 0.1s;
    text-transform: uppercase;
    display: inline-block;
}

.ttf-btn:hover {
    background-color: #2ae000;
    color: #000000;
}

.ttf-btn:active {
    transform: scale(0.98);
}

.ttf-btn-secondary {
    background-color: #eef0f3;
    color: #555555;
    border: 1px solid #cccccc;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    margin-bottom: 8px;
    transition: background-color 0.2s;
}

.ttf-btn-secondary:hover {
    background-color: #e0e2e6;
    color: #222222;
}

/* Instructions box */
.ttf-instructions {
    background-color: #f9f9f9;
    border-left: 3px solid #39ff14;
    padding: 12px;
    font-size: 12px;
    color: #666666;
    border-radius: 0 4px 4px 0;
    margin-top: 15px;
}

.ttf-instructions ul {
    margin: 5px 0 0 15px;
    padding: 0;
}

.ttf-instructions li {
    margin-bottom: 4px;
}

/* Visual Canvas Layout */
.ttf-canvas-toolbar {
    position: absolute;
    top: 30px;
    right: 30px;
    z-index: 10;
    background: rgba(255, 255, 255, 0.95);
    padding: 5px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 1px solid #e0e2e6;
}

.ttf-toolbar-btn {
    background: #ffffff;
    border: 1px solid #dddddd;
    color: #333333;
    padding: 6px 10px;
    margin: 0 2px;
    font-size: 12px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
}

.ttf-toolbar-btn:hover {
    background: #f5f6f8;
    border-color: #cccccc;
}

#ttf-network-canvas {
    width: 100%;
    height: 500px;
    background-color: #ffffff;
    border: 1px solid #e0e2e6;
    border-radius: 6px;
    position: relative;
    overflow: hidden;
}

/* Fullscreen Mode Overrides */
.ttf-container.fullscreen-active {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 999999 !important;
    margin: 0 !important;
    border-radius: 0 !important;
}

.ttf-container.fullscreen-active .ttf-workspace {
    height: calc(100vh - 60px);
}

.ttf-container.fullscreen-active .ttf-panel-left,
.ttf-container.fullscreen-active .ttf-panel-right {
    height: 100%;
}

.ttf-container.fullscreen-active #ttf-network-canvas {
    height: calc(100vh - 120px) !important;
}

.ttf-container.fullscreen-active #ttf-input-text {
    height: calc(100vh - 340px) !important;
}

/* Responsive Scaling for Mobile Screens */
@media screen and (max-width: 900px) {
    .ttf-workspace, .ttf-panel-left, .ttf-panel-right {
        display: block !important;
        width: 100% !important;
    }
    .ttf-panel-left {
        border-right: none;
        border-bottom: 1px solid #e0e2e6;
    }
    #ttf-network-canvas {
        height: 380px;
    }
}