/*
Theme Name: Top 10
Theme URI: https://top-10.netnatur.dk
Description: Standalone theme for Top 10 Trophy Records
Author: Scop Kariah - TownColors
Author URI: https://towncolors.com
Version: 2.0.0
Text Domain: top-10
*/

/* === Global Buttons === */
.btn-green { background-color: #28a745 !important; }
.btn-orange { background-color: #f47f2a !important; }

/* === Trophy Grid === */
.trophy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    padding-top: 2rem;
}

.trophy-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
    transition: transform 0.2s ease;
}
.trophy-card:hover { transform: translateY(-4px); }
.trophy-card img { width: 100%; border-radius: 8px; margin-bottom: 1rem; }
.trophy-card h3 { font-size: 1.2rem; margin-bottom: 0.5rem; color: #222; }
.trophy-card p { color: #555; font-size: 0.95rem; }
.trophy-card a {
    color: #c71585;
    font-weight: bold;
    text-decoration: none;
}
.trophy-card a:hover { text-decoration: underline; }

/* === Breadcrumbs === */
.breadcrumb-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    padding: 1rem 0;
}
.breadcrumb-btn {
    background-color: #f0f0f0;
    color: #c71585;
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
}
.breadcrumb-btn:hover {
    background-color: #c71585;
    color: #fff;
}
.breadcrumb-current {
    font-weight: bold;
    color: #333;
}

/* === Species Card Cleanup === */
.species-card img {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}

/* === DASHBOARD STYLES === */
.dashboard-wrapper {
    display: flex;
    flex-wrap: wrap;
    max-width: 1300px;
    margin: 3em auto;
    padding: 0 1em;
    gap: 2em;
    box-sizing: border-box;
    font-family: 'Segoe UI', sans-serif;
}

/* === SIDEBAR === */
.dashboard-sidebar {
    flex: 0 0 250px;
    background: #ffffff;
    padding: 2em 1em;
    border-radius: 10px;
    border: 1px solid #ddd;
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.04);
}
.dashboard-sidebar h3 {
    font-size: 1em;
    margin-bottom: 2em;
    color: #444;
    padding-left: 0.5em;
}
.dashboard-sidebar a {
    display: block;
    padding: 0.9em 1em;
    margin-bottom: 0.8em;
    text-decoration: none;
    border-radius: 6px;
    background-color: #f47f2a;
    color: white;
    font-weight: 600;
    transition: all 0.25s ease;
}
.dashboard-sidebar a:hover { background-color: #d55f0a; }
.dashboard-sidebar a.active {
    background-color: #222;
    color: #fff;
}

/* === MAIN DASHBOARD CONTENT === */
.dashboard-content {
    flex: 1;
    background: #fff;
    padding: 2.5em;
    border-radius: 10px;
    border: 1px solid #ddd;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.02);
}
.dashboard-header {
    margin-bottom: 2em;
}
.dashboard-header h1 {
    font-size: 2em;
    font-weight: 600;
    color: #222;
}
.dashboard-header p {
    color: #666;
    font-size: 0.95em;
}

/* === TROPHY FORM === */
#trophy-form {
    display: grid;
    gap: 1.5em;
    background: #fff;
    padding: 2em;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    max-width: 100%;
}
.trophy-form-row {
    display: flex;
    gap: 1em;
    flex-wrap: wrap;
}
.trophy-form-row > div {
    flex: 1 1 48%;
}
@media (max-width: 600px) {
    .trophy-form-row > div {
        flex: 1 1 100%;
    }
}
#trophy-form input,
#trophy-form select,
#trophy-form textarea {
    width: 100%;
    padding: 0.8em 1em;
    font-size: 1em;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-sizing: border-box;
    transition: border-color 0.3s;
}
#trophy-form input:focus,
#trophy-form select:focus,
#trophy-form textarea:focus {
    border-color: #f47f2a;
    outline: none;
}
#trophy-form textarea {
    min-height: 100px;
    resize: vertical;
}
#trophy-form button[type="submit"] {
    background: #f47f2a;
    color: white;
    padding: 0.9em 1.8em;
    font-size: 1.1em;
    font-weight: bold;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s;
}
#trophy-form button[type="submit"]:hover {
    background: #e56710;
}

/* === IMAGE PREVIEW === */
#image-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 1em;
}
#image-preview div {
    position: relative;
    width: 130px;
    height: 130px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #ccc;
}
#image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}
#image-preview span {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(0,0,0,0.6);
    color: white;
    padding: 2px 6px;
    border-radius: 50%;
    font-size: 0.9em;
    cursor: pointer;
    z-index: 2;
}
#image-preview span:hover {
    background: rgba(255, 0, 0, 0.8);
}

/* === TABLES === */
.dashboard-table-wrapper {
    overflow-x: auto;
    background: #fff;
    padding: 1.5em;
    border-radius: 10px;
    border: 1px solid #ddd;
}
.dashboard-table {
    width: 100%;
    border-collapse: collapse;
}
.dashboard-table th,
.dashboard-table td {
    padding: 0.9em 1em;
    border: 1px solid #e5e5e5;
    font-size: 0.95rem;
    text-align: left;
}
.dashboard-table thead {
    background-color: #f9f9f9;
}
.dashboard-table tbody tr:nth-child(even) {
    background-color: #fdfdfd;
}
.dashboard-table tbody tr:hover {
    background-color: #f3f3f3;
}
.dashboard-table .status-published {
    color: #28a745;
    font-weight: bold;
}
.dashboard-table .action-link {
    color: #c71585;
    font-weight: 500;
    text-decoration: none;
}
.dashboard-table .action-link:hover {
    text-decoration: underline;
}

/* === PAGINATION === */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5em;
    margin-top: 2em;
    flex-wrap: wrap;
}
.pagination a,
.pagination span {
    padding: 0.5em 0.8em;
    border: 1px solid #ddd;
    border-radius: 5px;
    color: #333;
    background: #fff;
    font-weight: 500;
    text-align: center;
    min-width: 36px;
}
.pagination a:hover {
    background: #f0f0f0;
}
.pagination .current {
    background: #2da440;
    color: #fff;
    border-color: #2da440;
}

/* === Responsive Tweak === */
@media (max-width: 900px) {
    .dashboard-wrapper {
        flex-direction: column;
    }
    .dashboard-sidebar {
        width: 100%;
        flex: 1 1 100%;
        text-align: center;
    }
    .dashboard-content {
        padding: 1.5em;
    }
    .trophy-form-row > div {
        flex: 1 1 100%;
    }
}

/* === Mobile Sidebar Toggle === */
.sidebar-toggle {
    display: none;
    background: #f47f2a;
    color: white;
    font-size: 1.2em;
    font-weight: bold;
    padding: 0.6em 1em;
    border: none;
    border-radius: 6px;
    margin: 1em;
    position: relative;
    z-index: 999;
}

#sidebarOverlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 998;
}

/* Sidebar open */
.sidebar-open .dashboard-sidebar {
    transform: translateX(0);
}
.sidebar-open #sidebarOverlay {
    display: block;
}

/* Responsive Sidebar for Mobile */
@media (max-width: 900px) {
    .sidebar-toggle {
        display: inline-block;
    }

    .dashboard-wrapper {
        flex-direction: column;
        position: relative;
    }

    .dashboard-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: 250px;
        background: white;
        z-index: 999;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        box-shadow: 2px 0 6px rgba(0, 0, 0, 0.1);
    }

    .dashboard-content {
        padding-top: 1em;
    }
}

