/**
 * Turboedytor v3 - Main Stylesheet
 * Bootstrap Material Design Theme
 */

:root {
    --primary: #667eea;
    --primary-dark: #764ba2;
    --secondary: #6c757d;
    --success: #28a745;
    --info: #17a2b8;
    --warning: #ffc107;
    --danger: #dc3545;
    --light: #f8f9fa;
    --dark: #343a40;
}

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    background-color: #f5f7fa;
    color: #333;
}

/* Navbar */
.navbar.bg-gradient {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: 500;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    color: white !important;
}

.navbar-brand .material-icons {
    color: white !important;
    margin-right: 8px;
}

.navbar-nav .nav-link {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    transition: background-color 0.2s;
    border-radius: 6px;
    margin: 0 4px;
    color: rgba(255, 255, 255, 0.9) !important;
}

.navbar-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white !important;
}

.navbar-nav .nav-link.active {
    background-color: rgba(255, 255, 255, 0.2);
    color: white !important;
}

.navbar-nav .nav-link .material-icons {
    font-size: 20px;
    margin-right: 6px;
    color: rgba(255, 255, 255, 0.9) !important;
}

.navbar-text {
    color: rgba(255, 255, 255, 0.9) !important;
}

.dropdown-menu {
    border: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 10px 16px;
}

.dropdown-item .material-icons {
    font-size: 20px;
    margin-right: 10px;
    color: #666;
}

/* Cards */
.card {
    border-radius: 12px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1) !important;
}

.module-card {
    cursor: pointer;
}

.module-icon {
    font-size: 48px;
}

.module-icon .material-icons {
    font-size: 48px;
}

/* Buttons */
.btn {
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    border: none;
}

.btn .material-icons {
    font-size: 20px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

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

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5568d3 0%, #653a8b 100%);
}

/* Forms */
.form-control,
.form-select {
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    padding: 10px 16px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.15);
}

.form-label {
    font-weight: 500;
    color: #555;
    margin-bottom: 8px;
}

/* Editor Container */
.editor-container {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.editor-toolbar {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 8px 8px 0 0;
    border-bottom: 2px solid #e0e0e0;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.editor-content {
    min-height: 400px;
    padding: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 0 0 8px 8px;
    background: white;
}

/* Alerts */
.alert {
    border-radius: 8px;
    border: none;
    padding: 16px 20px;
    display: flex;
    align-items: center;
}

.alert .material-icons {
    margin-right: 12px;
    font-size: 24px;
}

/* Footer */
.footer {
    border-top: 1px solid #e0e0e0;
    margin-top: auto;
}

/* Loading Spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.spinner-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
}

/* Headings List */
.headings-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.heading-item {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.heading-item .form-control {
    flex: 1;
    border: none;
    padding: 8px 12px;
}

.heading-item .btn-remove {
    flex-shrink: 0;
}

/* Translation Results */
.translation-result {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

.translation-result .language-label {
    font-weight: 500;
    color: var(--primary);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.translation-result .language-label .material-icons {
    margin-right: 8px;
}

/* Preset Selector */
.preset-card {
    cursor: pointer;
    transition: all 0.2s;
}

.preset-card:hover {
    border-color: var(--primary) !important;
    background-color: #f8f9ff;
}

.preset-card.selected {
    border-color: var(--primary) !important;
    background-color: #e8ebff;
}

/* Material Icons Alignment */
.material-icons {
    vertical-align: middle;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.1rem;
    }

    .module-icon {
        font-size: 36px;
    }

    .module-icon .material-icons {
        font-size: 36px;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Draft Indicator */
.draft-indicator {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--primary);
    color: white;
    padding: 10px 16px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    z-index: 1000;
}

.draft-indicator .material-icons {
    font-size: 18px;
}
