/* app.css - Temel Layout ve Sidebar Stilleri (Mobile First Yaklaşımı) */

/* === BÖLÜM 1: TÜM EKRANLARDA GEÇERLİ ORTAK STİLLER === */
:root {
    --primary-color: #2019e6;
    --primary-hover: #3a33ff;
    --secondary-color: #666666;
    --text-color: #000000;
    --text-light: #666666;
    --bg-color: #ffffff;
    --bg-light: #f8f9fa;
    --border-color: #e5e7eb;
    --shadow-light: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-medium: 0 10px 25px rgba(0, 0, 0, 0.1);
    --border-radius: 12px;
    --header-height: 70px;
    --sidebar-width-desktop: 240px;
    --sidebar-width-mobile: 260px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Poppins", sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* --- Sidebar Navigasyon Stilleri --- */
.tools-navigation {
    flex: 1;
    padding: 24px 0;
    overflow-y: visible; /* Scroll bar kaldırıldı */
    overflow-x: visible; /* Submenu'ların dışarı taşmasına izin ver */
}

.tool-category {
    margin-bottom: 32px;
}

.category-header {
    padding: 0 20px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tool-links-list {
    list-style: none;
    margin: 0px 10px;
}

.tool-link-item {
    margin-bottom: 4px;
}

.tool-action-link {
    display: flex;
    align-items: center;
    padding: 9px 18px;
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
    border-radius: 3rem;
    position: relative;
}

    .tool-action-link:hover {
        background: var(--bg-light);
        color: var(--primary-color);
    }

    .tool-action-link.active-tool {
        background-color: var(--primary-color);
        color: white;
        box-shadow: 0 4px 12px rgba(0, 126, 255, 0.3);
    }

.tool-icon-wrapper {
    width: 24px;
    height: 24px;
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tool-icon-wrapper svg {
    width: 100%;
    height: 100%;
    transition: all 0.2s ease;
}

.tool-icon-wrapper svg[fill="none"] {
    stroke: currentColor;
    fill: none !important;
}

.tool-icon-wrapper svg:not([fill="none"]) {
    fill: currentColor;
}

.tool-action-link:hover .tool-icon-wrapper {
    color: var(--primary-color);
}

.tool-action-link.active-tool .tool-icon-wrapper {
    color: white;
}

.tool-name-text {
    font-weight: 600;
    font-size: 12px;
}

.tool-action-link.non-clickable {
    cursor: default;
}

    .tool-action-link.non-clickable:hover {
        background: transparent;
        color: var(--text-color);
    }

        .tool-action-link.non-clickable:hover .tool-icon-wrapper {
            color: inherit;
        }

/* --- Submenu (Masaüstü Varsayılan) --- */
.tool-item-with-submenu {
    position: relative;
    /* Daha yüksek bir z-index verelim ve stacking context yaratalım */
    z-index: 9000; 
}

.tool-item-with-submenu:hover {
    z-index: 9999; /* Hover durumunda en üst seviyeye çıkaralım */
}

.submenu-panel {
    position: absolute;
    top: 0; /* Butonla aynı hizada */
    left: calc(100% + 8px); /* Butonun hemen yanında */
    width: 200px;
    background: var(--bg-color);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-medium);
    padding: 8px;
    z-index: 1035; /* Header'dan (1030) yüksek, modal'dan (1050) düşük */
    opacity: 0;
    visibility: hidden;
    transform: translateX(10px);
    transition: all 0.2s ease-out;
    pointer-events: auto; /* Her zaman tıklanabilir olsun */
}

.tool-item-with-submenu:hover .submenu-panel {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.submenu-panel:hover {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.submenu-links-list {
    list-style: none;
}

.submenu-link {
    display: block;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-light);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
}

    .submenu-link:hover {
        background-color: var(--bg-light);
        color: var(--text-color);
    }

    .submenu-link.active-submenu {
        background-color: var(--primary-color);
        color: white;
    }

.tool-item-with-submenu > .tool-action-link::after {
    content: '›';
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    font-weight: bold;
    color: var(--text-light);
    transition: all 0.2s ease;
}

.tool-item-with-submenu:hover > .tool-action-link::after {
    color: var(--primary-color);
}

/* Yardımcı sınıflar */
.hidden {
    display: none !important;
}

/* === BÖLÜM 2: MOBİL & MASAÜSTÜ LAYOUT (Mobile First) === */
.dashboard-container {
    padding-top: 2rem;
}

.sidebar-panel {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: var(--sidebar-width-mobile);
    height: calc(100% - var(--header-height));
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    background: var(--bg-color);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow: visible; /* Submenu'ların dışarı taşmasına izin ver */
}

    .sidebar-panel.mobile-open {
        transform: translateX(0);
    }

body.sidebar-open {
    overflow: hidden;
}

.main-content-area {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    margin-left: 0;
    padding: 16px;
}

@media (min-width: 769px) {
    .dashboard-container {
        display: flex;
    }

    .sidebar-panel {
        transform: translateX(0);
        position: fixed;
        flex-shrink: 0;
        width: var(--sidebar-width-desktop);
        box-shadow: none;
    }

    .main-content-area {
        margin-left: var(--sidebar-width-desktop);
        padding: 32px;
    }
}

/* === BÖLÜM 3: MOBİL AKORDİYON MENÜ EZMELERİ (OVERRIDE) === */
@media (max-width: 768px) {
    .tool-item-with-submenu:hover .submenu-panel {
        opacity: 1;
        visibility: visible;
    }

    .submenu-panel {
        position: static;
        width: 100%;
        box-shadow: none;
        border: none;
        border-radius: 0;
        padding: 0;
        margin-top: 0;
        max-height: 0; /* height yerine max-height */
        overflow: hidden;
        opacity: 1;
        visibility: visible;
        transform: none;
        transition: max-height 0.3s ease-in-out, padding 0.3s ease-in-out; /* height -> max-height */
    }

    /* Ana link aktif olduğunda, alt menüyü aç */
    .tool-action-link.active-tool + .submenu-panel {
        max-height: 1000px; /* içeriği rahatlıkla sığdıracak büyük bir değer */
        padding: 8px 0 8px 24px;
    }

    /* Ok ikonlarını ayarla */
    .tool-item-with-submenu > .tool-action-link::after {
        content: '▼';
        font-size: 10px;
        transform: translateY(-50%) rotate(0deg);
        transition: transform 0.3s ease;
    }

    .tool-item-with-submenu > .tool-action-link.active-tool::after {
        transform: translateY(-50%) rotate(180deg);
    }
}

/* === ÜRÜN ÖZELLEŞTİRME PANELİ İMPORT === */
@import url('components/product-customization.css');
