/* 
 * Ghartal - Main Stylesheet
 * This file contains all styles for the Ghartal website
 */

/* ===== GENERAL STYLES ===== */
body {
    padding-top: 56px; /* Height of navbar */
    font-family: 'Roboto', sans-serif;
}

.main-content {
    flex: 1;
    margin-left: 250px;
    padding: 20px;
}

@media (max-width: 768px) {
    .main-content {
        margin-left: 0;
    }
}

.container-fluid {
    padding-top: 10px;
}

/* ===== SIDEBAR STYLES ===== */
.sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: 250px;
    z-index: 100;
    padding: 0;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    background-color: #343a40;
    color: white;
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.75);
    padding: 0.75rem 1.25rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar .nav-link:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
}

.sidebar .nav-link.active {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.2);
}

.sidebar .nav-link i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.sidebar-header {
    padding: 1rem;
    background-color: #212529;
    text-align: center;
}

.sidebar-header img {
    max-width: 150px;
    height: auto;
}

.sidebar-divider {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin: 0.5rem 1rem;
}

.sidebar-footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 1rem;
    background-color: #212529;
    font-size: 0.8rem;
    text-align: center;
}

/* Sidebar link with icon and text */
.sidebar-link-content {
    display: flex;
    align-items: center;
}

/* Badge styling for notification counts */
.badge-notification {
    background-color: #dc3545;
    color: white;
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
}

/* ===== DASHBOARD CARDS ===== */
.dashboard-card {
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    height: 100%;
}

.dashboard-card:hover {
    transform: translateY(-5px);
}

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

.dashboard-card .card-title {
    font-weight: 600;
    margin-bottom: 1rem;
}

.dashboard-card .card-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #007bff;
}

.dashboard-card .card-stat {
    font-size: 2rem;
    font-weight: 700;
}

/* ===== FORMS AND INPUTS ===== */
.form-control:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
}

.btn-primary:hover {
    background-color: #0069d9;
    border-color: #0062cc;
}

.btn-danger {
    background-color: #dc3545;
    border-color: #dc3545;
}

.btn-danger:hover {
    background-color: #c82333;
    border-color: #bd2130;
}

/* ===== TABLES ===== */
.table th {
    font-weight: 600;
    background-color: #f8f9fa;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.02);
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.04);
}

/* ===== EDITOR STYLES ===== */
/* Summernote editor styles */
.note-editor .note-toolbar {
    background-color: #f8f9fa;
}

.note-editor {
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
}

.note-editor .note-editing-area {
    min-height: 200px;
    max-height: 400px;
    overflow-y: auto;
}

/* Quill editor styles */
.ql-editor {
    min-height: 200px;
    max-height: 400px;
    overflow-y: auto;
}

.ql-editor img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 10px 0;
}

.ql-toolbar {
    background: white;
    position: sticky;
    top: 0;
    z-index: 1;
}

.ql-video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    margin: 10px 0;
}

.ql-video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.ql-toolbar button.ql-video::after {
    content: "📺";
    font-size: 18px;
}

.ql-toolbar button.ql-video svg {
    display: none;
}

/* Editor tips */
.editor-tips {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 15px;
    margin-top: 10px;
}

.editor-tips ul {
    margin-bottom: 0;
    padding-left: 20px;
}

.editor-tips li {
    margin-bottom: 5px;
}

/* Image upload loading state */
.ql-editor.uploading::after {
    content: 'Uploading image...';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.8);
    padding: 8px 16px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* ===== MODAL STYLES ===== */
.modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

/* ===== ALERTS AND NOTIFICATIONS ===== */
.alert {
    border-radius: 0.25rem;
    padding: 1rem;
    margin-bottom: 1rem;
}

.alert-dismissible .btn-close {
    padding: 1.25rem;
}

/* ===== PAGINATION ===== */
.pagination {
    justify-content: center;
    margin-top: 1.5rem;
}

.page-item.active .page-link {
    background-color: #007bff;
    border-color: #007bff;
}

.page-link {
    color: #007bff;
}

.page-link:hover {
    color: #0056b3;
    background-color: #e9ecef;
    border-color: #dee2e6;
}

/* ===== BADGES ===== */
.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
}

/* ===== UTILITIES ===== */
.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.border-bottom {
    border-bottom: 1px solid #dee2e6 !important;
}

.mb-3 {
    margin-bottom: 1rem !important;
}

.mt-2 {
    margin-top: 0.5rem !important;
}

.mt-4 {
    margin-top: 1.5rem !important;
}

.p-3 {
    padding: 1rem !important;
}

/* ===== CUSTOM TOOLTIPS ===== */
.tooltip {
    position: absolute;
    z-index: 1070;
    display: block;
    margin: 0;
    font-family: inherit;
    font-style: normal;
    font-weight: 400;
    line-height: 1.5;
    text-align: left;
    text-decoration: none;
    text-shadow: none;
    text-transform: none;
    letter-spacing: normal;
    word-break: normal;
    word-spacing: normal;
    white-space: normal;
    line-break: auto;
    font-size: 0.875rem;
    word-wrap: break-word;
    opacity: 0;
}

.tooltip.show {
    opacity: 0.9;
}

.tooltip .tooltip-inner {
    max-width: 200px;
    padding: 0.25rem 0.5rem;
    color: #fff;
    text-align: center;
    background-color: #000;
    border-radius: 0.25rem;
}

/* ===== DEATH RECORDS STYLES ===== */
.death-record-card {
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

.death-record-card .card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    padding: 1rem;
}

.death-record-card .card-body {
    padding: 1.5rem;
}

.death-record-status {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.death-record-status.active {
    background-color: #28a745;
    color: white;
}

.death-record-status.inactive {
    background-color: #dc3545;
    color: white;
}

/* ===== VILLAGE PROJECTS STYLES ===== */
.project-card {
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
}

.project-card .card-img-top {
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    height: 200px;
    object-fit: cover;
}

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

.project-card .card-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.project-card .card-text {
    color: #6c757d;
}

.project-status {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.project-status.completed {
    background-color: #28a745;
    color: white;
}

.project-status.in-progress {
    background-color: #ffc107;
    color: #212529;
}

.project-status.planned {
    background-color: #17a2b8;
    color: white;
}

/* ===== GALLERY STYLES ===== */
.gallery-card {
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease;
}

.gallery-card:hover {
    transform: translateY(-5px);
}

.gallery-card .card-img-top {
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    height: 200px;
    object-fit: cover;
}

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

.gallery-card .card-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.gallery-status {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.gallery-status.active {
    background-color: #28a745;
    color: white;
}

.gallery-status.inactive {
    background-color: #dc3545;
    color: white;
}

/* ===== LOGIN PAGE STYLES ===== */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #f8f9fa;
}

.login-card {
    width: 100%;
    max-width: 400px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    background-color: white;
}

.login-card .card-header {
    background-color: #343a40;
    color: white;
    text-align: center;
    padding: 1.5rem;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.login-card .card-body {
    padding: 2rem;
}

.login-logo {
    max-width: 150px;
    margin-bottom: 1rem;
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 992px) {
    .main-content {
        margin-left: 0;
    }
    
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .modal-dialog {
        max-width: 90%;
    }
}

@media (max-width: 576px) {
    .dashboard-card .card-stat {
        font-size: 1.5rem;
    }
    
    .dashboard-card .card-icon {
        font-size: 2rem;
    }
    
    .login-card {
        max-width: 90%;
    }
} 