/* File: public/assets/css/app.css */

/* Global Styles */
body {
    background-color: #f8f9fa;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
    padding: 2rem 0;
}

.footer {
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

tbody, td, tfoot, th, thead, tr {
  border-color: lightgray!important;
  border-style: solid!important;
  border-width: 1px!important;
}

/* Navigation */
.navbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Cards */
.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.card {
    position: relative;
}

.card:hover {
    transform: translateY(-2px);
    z-index: 9999;
}

/* Fix z-index issue for card dropdowns */
.card .dropdown-menu {
    z-index: 9999 !important;
}

/* Login Page Styles */
.login-page body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 25px;
}

.btn-outline-primary {
    border-color: #667eea;
    color: #667eea;
    border-radius: 25px;
}

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

/* Document-specific styles */
.document-card {
    border-left: 4px solid #007bff;
    margin-bottom: 1rem;
}

.document-card.favorite {
    border-left-color: #dc3545;
}

.document-card.archived {
    opacity: 0.7;
    border-left-color: #6c757d;
}

.document-item {
    border-left: 4px solid #007bff;
    transition: all 0.2s ease;
}

.document-item:hover {
    border-left-color: #0056b3;
    background-color: #f8f9fa;
}

.document-actions {
    opacity: 0;
    transition: opacity 0.2s ease;
}

.document-card:hover .document-actions {
    opacity: 1;
}

.content-preview {
    color: #6c757d;
    font-size: 0.875rem;
    max-height: 2.5rem;
    overflow: hidden;
    line-height: 1.25;
}

/* Categories */
.category-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    color: white;
    font-size: 0.875rem;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

.category-item {
    transition: all 0.2s ease;
    cursor: move;
}

.category-item:hover {
    background-color: #f8f9fa;
}

.drag-handle {
    cursor: grab;
}

.drag-handle:active {
    cursor: grabbing;
}

.category-color-indicator {
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.sortable-ghost {
    opacity: 0.5;
}

.sortable-chosen {
    background-color: #e3f2fd;
}

.category-form .form-control-color {
    width: 50px;
    height: 38px;
    border-radius: 6px;
    border: 1px solid #ddd;
}

.category-preview {
    transition: all 0.3s ease;
}

/* Dashboard specific */
.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.stat-card .card-body {
    padding: 1.5rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.search-box {
    border-radius: 25px;
    border: 1px solid #ddd;
    padding: 0.5rem 1rem;
}

/* Documents page specific */
.search-filters {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Document editor styles */
.editor-container {
    border: 1px solid #ddd;
    border-radius: 10px;
    background: white;
}

#editor {
    min-height: 400px;
}

.ql-toolbar {
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    border-bottom: 1px solid #ddd;
}

.ql-container {
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
}

/* Document view styles */
.document-header {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.document-content {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    min-height: 400px;
}

.document-meta {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.content-area {
    line-height: 1.7;
    font-size: 1.1rem;
}

.content-area h1, .content-area h2, .content-area h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.content-area h1:first-child, 
.content-area h2:first-child, 
.content-area h3:first-child {
    margin-top: 0;
}

.content-area p {
    margin-bottom: 1rem;
}

.content-area blockquote {
    border-left: 4px solid #667eea;
    padding-left: 1rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: #6c757d;
}

.content-area ul, .content-area ol {
    margin-bottom: 1rem;
    padding-left: 2rem;
}

.content-area li {
    margin-bottom: 0.5rem;
}

.toolbar-actions {
    position: sticky;
    top: 20px;
    z-index: 100;
}

/* Login page specific */
.login-container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header i {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 1rem;
}

.login-header h2 {
    color: #333;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: #666;
    margin-bottom: 0;
}

.btn-login {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 10px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* Form controls */
.form-control {
    border-radius: 10px;
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    transition: all 0.3s ease;
}

.form-control:focus {
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    border-color: #667eea;
}

.input-group-text {
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 10px 0 0 10px;
}

/* Alerts */
.alert {
    border-radius: 10px;
    border: none;
}

/* Utility classes */
.text-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .document-actions {
        opacity: 1;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .document-header {
        padding: 1.5rem;
    }
    
    .document-content {
        padding: 1.5rem;
    }
}

/* TinyMCE editor padding for better cursor visibility */
.tox .tox-edit-area__iframe {
    padding: 10px !important;
}

/* Add padding to the content inside the TinyMCE iframe */
.mce-content-body {
    padding: 15px !important;
}
