/* public/css/main.css */

/* Font Tanımlamaları: sistem yazı tipleri kullanılmaktadır. */
/* Genel stil – Açık Tema ve Responsive Tasarım */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body, html {
    width: 100%;
    height: 100%;
    font-family: 'roboto', Arial, sans-serif;
    background-color: var(--theme-body-bg, #d0e2f1);
    color: var(--theme-body-text, #000000);
    font-size: var(--theme-body-font-size, 12px);
}

html, body, * {
    scrollbar-width: thin;
    scrollbar-color: var(--theme-scrollbar-thumb-bg, #9aa9be) var(--theme-scrollbar-track-bg, #dce4ef);
}

*::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

*::-webkit-scrollbar-track {
    background: var(--theme-scrollbar-track-bg, #dce4ef);
    border-radius: 999px;
}

*::-webkit-scrollbar-thumb {
    background: var(--theme-scrollbar-thumb-bg, #9aa9be);
    border-radius: 999px;
    border: 2px solid var(--theme-scrollbar-track-bg, #dce4ef);
}

*::-webkit-scrollbar-thumb:hover {
    background: var(--theme-scrollbar-thumb-hover-bg, #7e8fa8);
}

*::-webkit-scrollbar-corner {
    background: var(--theme-scrollbar-track-bg, #dce4ef);
}

body {
    background-color: var(--theme-body-bg, #d0e2f1);
    color: var(--theme-body-text, #000000);
    font-size: var(--theme-body-font-size, 12px);
}

.container {
    display: flex;
    height: 100vh;  /* Desktop görünümde container tam ekran yüksekliğinde */
    overflow: hidden;
    background-color: var(--theme-body-bg, #d0e2f1);
}

/* Sidebar (Menü Bölgesi) */
.sidebar {
    width: 300px;
    display: flex;
    flex-direction: column;
    background-color: var(--theme-sidebar-menu-bg, #f7f7f7);
    color: var(--theme-body-text, #000000);
}

/* Desktop için Sidebar Header (logo) */
.sidebar-header {
    background-color: var(--theme-sidebar-logo-bg, #e0e0e0);
    padding: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
}
.sidebar-header .logo img {
    max-width: 100%;
    height: auto;
    max-height: 84px;
    object-fit: contain;
}
.sidebar-header,
.mobile-header {
    background-color: var(--theme-sidebar-logo-bg, #e0e0e0);
    background-image: none;
}
.sidebar-header .logo,
.mobile-header .logo {
    background: transparent;
    background-image: none;
}

/* Kullanıcı Paneli ve Login Formu */
.user-panel {
    background-color: var(--theme-sidebar-panel-bg, #f0f0f0);
    padding: 10px;
    color: var(--theme-sidebar-user-card-text, #111827);
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.input-group {
    display: flex;
    align-items: center;
    background-color: var(--theme-input-normal-bg, #fff);
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 5px;
}

.input-group input {
    border: none;
    outline: none;
    flex: 1;
    padding: 5px;
    background: var(--theme-input-normal-bg, #fff);
    color: var(--theme-input-normal-text, #000);
    font-size: var(--theme-input-normal-font-size, 12px);
}

.input-icon {
    width: 20px;
    height: 20px;
    margin-right: 5px;
}

/* Updated Login Button Styles */
.login-btn {
    padding: 10px;
    background-color: #343434 !important;
    border: none;
    color: #f4f4f4 !important;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'robotoBlack', Arial, sans-serif;
    font-size: 12px;
}

.login-btn:hover {
    background-color: #4f4f4f !important;
}

/* New User Link Styles */
.new-user a {
    display: inline-flex;
    align-items: center;
    color: #333333;
    text-decoration: none;
    margin-top: 10px;
    font-family: 'roboto', Arial, sans-serif;
    font-size: 14px;
}

.new-user a:hover {
	color: #bc2f2f;
    cursor: pointer;
    text-decoration: underline;
}

.new-user-icon {
    width: 20px;
    height: 20px;
    margin-right: 5px;
}

/* Navigasyon Menüsü */
.menu-wrapper {
    flex-grow: 1;
    overflow-y: auto;
    padding: 10px;
    background-color: var(--theme-sidebar-menu-bg, #f7f7f7);
}

.menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu ul li {
    margin-bottom: 10px;
}

.menu ul li a {
    display: flex;
    align-items: center;
    padding: 10px;
    background-color: var(--theme-menu-passive-bg, #dddddd);
    border-radius: 4px;
    color: var(--theme-menu-passive-text, #000000);
    text-decoration: none;
    font-size: var(--theme-menu-passive-font-size, 12px);
}

.menu ul li a:hover {
    background-color: var(--theme-menu-passive-bg, #dddddd);
    filter: brightness(0.96);
}

.menu-icon {
    width: 20px;
    height: 20px;
    margin-right: 8px;
}

/* Active Navigation Link */
.nav-link.active {
    background-color: var(--theme-menu-active-bg, #7af972);
    color: var(--theme-menu-active-text, #000000);
    font-size: var(--theme-menu-active-font-size, var(--theme-menu-passive-font-size, 12px));
}

/* Sidebar Footer – Koyu tema */
.sidebar-footer {
    background-color: #333; /* Koyu gri */
    padding: 5px;
	padding-top: 5px;
    text-align: center;
    font-size: 12px;
    color: #fff;
    font-family: 'robotoBlack', 'roboto', Arial, sans-serif;
}

/* İçerik Alanı */
#content {
    background-color: var(--theme-body-bg, #d0e2f1);
    color: var(--theme-body-text, #000000);
    overflow-x: auto;
    padding: 0;
}

#content .inner {
    width: 980px;
    margin: 0 auto;
    background: transparent;
}

/* Mobile Header: Varsayılan gizli; mobil ve orta ekranlarda gösterilecek */
.mobile-header {
    display: none; /* Varsayılan gizli */
    background-color: #e0e0e0;
    padding: 10px;
    align-items: center;
    justify-content: space-between;
}
.mobile-header .logo{min-width:0;display:flex;align-items:center;}
.mobile-header .logo img {
    display: block;
    height: 40px;
    width: auto;
    max-width: min(220px, calc(100vw - 92px));
    object-fit: contain;
    content: none;
}
/* Hamburger butonu: Mobile header içinde görünmesi için */
.mobile-header .hamburger {
    display: block;
}
.hamburger {
    background: none;
    border: none;
    cursor: pointer;
}
.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 4px 0;
}

/* Loader CSS */
#loader {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 8px solid #f3f3f3;
    border-top: 8px solid #3498db;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    z-index: 2000;
    display: none;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Medya Sorguları */

/* 1) Desktop: Ekran genişliği 1301px ve üzeri */
@media (min-width: 1301px) {
    .mobile-header {
        display: none !important;
    }
    .sidebar {
        position: static;
    }
    .sidebar-header {
        display: flex;
    }
    /* Sidebar (300px) + içerik (1000px) = 1300px */
    #content {
        margin-left: calc((100vw - 1300px) / 2);
        margin-right: calc((100vw - 1300px) / 2);
    }
}

/* 2) Orta boy: Ekran genişliği 1001px – 1300px */
@media (min-width: 1001px) and (max-width: 1300px) {
    .mobile-header {
        display: flex;
        height: 60px; /* Mobil menü yüksekliği: 60px */
    }
    /* Desktop'da kullanılan logo, orta boyda mobile header ile gösterileceği için gizlenir */
    .sidebar-header {
        display: none;
    }
    /* Sidebar overlay olarak konumlanır */
    .sidebar {
        position: fixed;
        top: 0;
        left: -300px;
        width: 300px;
        height: 100%;
        transition: left 0.3s ease;
        z-index: 1000;
    }
    /* Hamburger ile açıldığında sidebar’ın ekranda görünmesi için */
    .sidebar.open {
        left: 0;
    }
    /* Container yüksekliğini mobil header ve margin toplamı kadar düşürüyoruz */
    .container {
        margin-top: 3px;
        height: calc(100vh - 63px);
    }
    #content {
        margin-left: calc((100vw - 1000px) / 2);
        margin-right: calc((100vw - 1000px) / 2);
        height: 100%;
        overflow-y: auto;
    }
}

/* 3) Mobil: Ekran genişliği 1000px ve altı */
@media (max-width: 1000px) {
    .mobile-header {
        display: flex;
        height: 60px;
    }
    .sidebar-header {
        display: none;
    }
    .sidebar {
        position: fixed;
        top: 0;
        left: -300px;
        width: 300px;
        height: 100%;
        transition: left 0.3s ease;
        z-index: 1000;
    }
    .sidebar.open {
        left: 0;
    }
    .container {
        margin-top: 3px;
        height: calc(100vh - 63px);
    }
    #content {
        margin-left: 0;
        margin-right: 0;
        height: 100%;
        overflow-y: auto;
    }
}
