/* General Styling */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f9f9f9;
    font-size: 14px; /* Smanjen font */
}

header {
    background-color: #F4623A;
    color: white;
    padding: 10px 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

    header nav ul {
        list-style: none;
        margin: 0;
        padding: 0;
        display: flex;
        justify-content: center; /* Centriran meni */
    }

        header nav ul li {
            margin-right: 20px;
        }

            header nav ul li a {
                color: white;
                text-decoration: none;
                font-weight: bold;
                transition: color 0.3s;
            }

                header nav ul li a:hover {
                    color: #ffeadf;
                }

/* Footer Styling */
footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 10px 0;
    font-size: 12px; /* Smanjen font */
}

/* Home Page Styling */
.text-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: calc(100vh - 120px); /* Visina sa uračunatim headerom i footerom */
    text-align: center;
}

    .text-center h1 {
        font-size: 24px; /* Smanjen font za naslov */
        margin-bottom: 15px;
    }

    .text-center p {
        font-size: 16px;
        margin-bottom: 20px;
    }

    .text-center .btn {
        padding: 10px 20px;
        font-size: 14px;
    }

/* Layout Styling */
.container {
    display: flex;
    margin: 20px auto;
    max-width: 1200px;
    gap: 15px;
}

.listing-details {
    display: block;
}

.listing-details h1 {
    color: red;
    margin-bottom: 20px;
}

.listing-details img {
    width: 100%;
    max-width: 300px;
    margin-bottom: 10px;
}

.listing-details table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.listing-details table th,
.listing-details table td {
    border: 1px solid #ddd;
    padding: 8px;
}

/*.listing-details table th {
    background-color: #f4f4f4;
}*/


/* Sidebar (Tree View) Styling */
.tree-view ul {
    list-style: none;
    padding-left: 15px;
    margin: 0;
}

.tree-node {
    cursor: pointer;
    font-weight: bold;
    color: #333;
    transition: color 0.3s;
}

    .tree-node:hover {
        color: #F4623A;
    }

.toggle-icon {
    color: #F4623A;
    margin-right: 5px;
}

.child-nodes {
    padding-left: 20px;
    list-style-type: none;
}

/* Section Styling */
section {
    flex: 1;
    background-color: white;
    padding: 15px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Button Styling */
button {
    padding: 8px 12px;
    font-size: 12px; /* Smanjen font za dugmad */
    font-weight: bold;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

    /* Dugmad različitih boja */
    button#map-category {
        background-color: #007bff; /* Plava */
        color: white;
    }

        button#map-category:hover {
            background-color: #0056b3;
        }

    button.hide {
        background-color: #28a745; /* Zelena */
        color: white;
    }

        button.hide:hover {
            background-color: #218838;
        }

    button.show {
        background-color: #ffc107; /* Žuta */
        color: black;
    }

        button.show:hover {
            background-color: #e0a800;
        }

    button.refresh {
        background-color: #17a2b8; /* Tirkizna */
        color: white;
    }

        button.refresh:hover {
            background-color: #138496;
        }

    button.delete {
        background-color: #dc3545; /* Crvena */
        color: white;
    }

        button.delete:hover {
            background-color: #c82333;
        }

button.sync{
    background-color: #f4623a; /* lila */
    color: white;
}

    button.sync:hover {
        background-color: #f46222;
    }

/* Table Styling */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

    table th, table td {
        border: 1px solid #ddd;
        padding: 8px;
        text-align: left;
    }

    table th {
        background-color: #F4623A;
        color: white;
    }

    table tr:nth-child(even) {
        background-color: #f9f9f9;
    }

    table tr:hover {
        background-color: #ffe3d1;
    }

#product-search {
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}


/* Centriranje sadržaja na početnoj stranici */
.fullscreen-center {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: calc(100vh - 120px); /* Visina viewport-a minus header i footer */
    text-align: center;
    margin: 0 auto;
}

    .fullscreen-center h1 {
        font-size: 24px;
        margin-bottom: 15px;
    }

    .fullscreen-center p {
        font-size: 16px;
        margin-bottom: 20px;
    }

    .fullscreen-center .btn {
        padding: 10px 20px;
        font-size: 14px;
        background-color: #F4623A;
        color: white;
        border: none;
        border-radius: 5px;
        font-weight: bold;
        text-decoration: none;
        transition: background 0.3s;
    }

        .fullscreen-center .btn:hover {
            background-color: #e3542f;
        }


/* Dugmad za različite akcije */

/* Mapiraj dugme */
button.map {
    background-color: #007bff; /* Plava */
    color: white;
}

    button.map:hover {
        background-color: #0056b3;
    }

/* Sakrij dugme */
button.hide {
    background-color: #28a745; /* Zelena */
    color: white;
}

    button.hide:hover {
        background-color: #218838;
    }

/* Prikaži dugme */
button.show {
    background-color: #ffc107; /* Žuta */
    color: black;
}

    button.show:hover {
        background-color: #e0a800;
    }

/* Osvježi dugme */
button.refresh {
    background-color: #17a2b8; /* Tirkizna */
    color: white;
}

    button.refresh:hover {
        background-color: #138496;
    }

/* Obriši dugme */
button.delete {
    background-color: #dc3545; /* Crvena */
    color: white;
}

    button.delete:hover {
        background-color: #c82333;
    }


/* Slika u detaljima kategorije */
#category-image {
    max-width: 200px; /* Maksimalna širina slike */
    max-height: 150px; /* Maksimalna visina slike */
    object-fit: cover; /* Prilagođavanje omjera slike */
    margin-bottom: 10px; /* Razmak ispod slike */
    border: 1px solid #ddd; /* Tanki okvir */
    border-radius: 5px; /* Blago zaobljeni uglovi */
}

.category-details {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

    .category-details h2 {
        font-size: 18px;
        margin-bottom: 15px;
        color: #333;
    }

.category-image {
    max-width: 200px;
    max-height: 150px;
    object-fit: cover;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-bottom: 10px;
}

.mapping-section {
    margin-top: 20px;
}

.category-dropdown {
    margin-right: 10px;
    padding: 5px;
}

.mapping-status {
    margin-top: 10px;
    padding: 10px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
}

    .mapping-status.mapped {
        background-color: #d4edda; /* Light green */
        color: #155724; /* Dark green */
        border: 1px solid #c3e6cb;
    }

    .mapping-status.not-mapped {
        background-color: #f8d7da; /* Light red */
        color: #721c24; /* Dark red */
        border: 1px solid #f5c6cb;
    }

    .mapping-status.success {
        color: green;
        font-weight: bold;
    }

    .mapping-status.error {
        color: red;
        font-weight: bold;
    }

.map[disabled] {
    background-color: #ccc;
    cursor: not-allowed;
}



/* Razmak između dugmadi */
table td button {
    margin: 5px 5px 0 0; /* Razmak od 5px desno i između redova */
    display: inline-block; /* Dugmad u jednom redu */
}

.no-icon {
    display: inline-block;
    width: 16px; /* Širina jednaka PLUS ikoni */
    height: 16px; /* Visina jednaka PLUS ikoni */
    visibility: hidden; /* Sakriva element, ali zadržava prostor */
}

/* Caret styling */

.w-tree-cat-caret::before {
    content: "\25B6"; /* Right-pointing triangle */
    color: #c00; /* Red color */
    display: inline-block;
    margin-right: 6px;
    transition: transform 0.3s ease; /* Smooth rotation */
}

.w-tree-cat-caret-expanded::before {
    transform: rotate(90deg); /* Rotate when expanded */
}

.w-tree-no-child {
    color: #888; /* Gray color for non-expandable categories */
    font-size: 12px; /* Adjust size as needed */
    margin-right: 6px;
}


/* Modal styling */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: white;
    padding: 20px 30px;
    border-radius: 8px;
    text-align: center;
    font-size: 16px;
    font-weight: bold;
    color: #333;
}
