/* Translation Tool Specific Styles */

.tool-container {
    display: grid;
    grid-template-columns: 1fr 300px; /* Sidebar on RIGHT - Reduced width */
    gap: 0;
    max-width: 100vw;
    margin: 0;
    margin-top: 70px; /* Offset for Header Height to prevent overlap */
    min-height: calc(100vh - 70px);
    background: var(--bg);
}

.settings-sidebar {
    background: var(--surface);
    border-left: 1px solid var(--border);
    padding: 20px; /* Reduced padding */
    display: flex;
    flex-direction: column;
    height: calc(100vh - 70px); /* Fixed height within bounds */
    overflow-y: auto;
    position: sticky;
    top: 70px;
    z-index: 10;
}

.settings-sidebar h2 {
    font-size: 1.1rem; /* Smaller font */
    margin-bottom: 5px;
}

.settings-sidebar p {
    font-size: 0.75rem; /* Smaller font */
}

.main-workspace {
    padding: 30px;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-y: auto;
    width: 100%;
    min-height: calc(100vh - 70px);
    position: relative;
    /* Removed justify-content: center to keep content flow from the top */
}

.preview-container {
    width: 100%;
    max-width: 800px;
    margin: 30px auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
    /* Removed margin-top: auto as requested to bring filename higher */
}

.file-info-bar {
    padding: 10px 15px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--text-main);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Page Thumbnail / Content at the bottom */
#pages-grid {
    display: flex;
    justify-content: center;
    margin-top: 40px;
    padding-bottom: 50px;
}

.sidebar-section h3 {
    font-size: 0.75rem; /* Smaller font */
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.option-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    padding: 14px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    overflow: hidden;
}

.option-card:hover {
    background: rgba(255, 0, 0, 0.05);
    border-color: rgba(255, 0, 0, 0.3);
    transform: translateY(-2px);
}

.option-card.active {
    background: rgba(255, 0, 0, 0.08); /* Primary brand color shift */
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.15), inset 0 0 10px rgba(255, 0, 0, 0.05);
}

/* Add a subtle indicator for active cards */
.option-card.active::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 15px;
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
    transform: translateY(-50%);
    box-shadow: 0 0 8px var(--primary);
}

.option-card i {
    font-size: 1.1rem;
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.option-card.active i {
    color: var(--primary);
    transform: scale(1.1);
}

.option-card .info {
    flex: 1;
}

.option-card .title {
    display: block;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-main);
    margin-bottom: 2px;
}

.option-card .desc {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.3;
}

.option-card.active .desc {
    color: var(--text-main);
    opacity: 0.8;
}

.lang-field label {
    font-size: 0.75rem; /* Smaller font */
}

.lang-select-wrapper select {
    padding: 10px;
    font-size: 0.85rem;
}

#process-btn {
    width: 100%;
    padding: 15px;
    font-size: 0.9rem;
}

/* Mobile Responsive */
@media (max-width: 992px) {
    .tool-container {
        grid-template-columns: 1fr;
    }
    
    .settings-sidebar {
        border-left: none;
        border-bottom: 1px solid var(--border);
        height: auto;
        order: 2;
    }
    
    .main-workspace {
        order: 1;
        min-height: 400px;
    }
}
