/**
 * MixterPlus Beta - Consolidated Stylesheet
 * Extracted rules for editTrack interface with collapsible sidebar
 */

@import url('https://fonts.googleapis.com/css2?family=Ubuntu:ital,wght@0,400;0,500;0,700;1,400&display=swap');

/* ============================================
   CSS Variables
   ============================================ */
:root {
    --mp-bg-dark: #0f0f23;
    --mp-bg-sidebar: #1a1a2e;
    --mp-bg-input: #1a1a2e;
    --mp-text: #ddd;
    --mp-text-muted: #888;
    --mp-accent: #518BA1;
    --mp-accent-hover: #6aa3b7;
    --mp-link: #E77D42;
    --mp-link-hover: #f09a66;
    --mp-border: #333;
    --mp-sidebar-width: 260px;
}

/* ============================================
   Base / Reset
   ============================================ */
* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: "Ubuntu", sans-serif;
    font-size: 16px;
    line-height: 1.1;
    background-color: var(--mp-bg-dark);
    color: var(--mp-text);
}

/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-weight: 500;
    line-height: 1.2;
}

.orangeTitle {
    color: var(--mp-link);
}

h3 {
    font-size: 1.5rem;
    margin-top: 1.5rem;
}

h3.pageTitle {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #fff;
}

p {
    margin-top: 0;
    margin-bottom: 1rem;
}

/* ============================================
   Links
   ============================================ */
a {
    color: var(--mp-link);
    text-decoration: none;
}

a:hover {
    color: var(--mp-link-hover);
    text-decoration: underline;
}

/* ============================================
   Layout - Sidebar + Main Content
   ============================================ */
.mp-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.mp-sidebar {
    width: var(--mp-sidebar-width);
    background-color: var(--mp-bg-sidebar);
    border-right: 1px solid var(--mp-border);
    display: flex;
    flex-direction: column;
    transition: margin-left 0.3s ease;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 100;
}

.mp-sidebar.collapsed {
    margin-left: calc(-1 * var(--mp-sidebar-width));
}

.mp-sidebar-header {
    padding: 1rem 1rem 1rem 3.5rem;
    border-bottom: 1px solid var(--mp-border);
}

.mp-sidebar-header .logo {
    display: block;
    text-decoration: none;
}

.mp-sidebar-header .logo img {
    max-width: 100%;
    height: auto;
    max-height: 50px;
}

.mp-sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0;
}

.mp-sidebar-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}


/* Plain nav items - black text on white background (both modes) */
.mp-sidebar-nav li.mp-nav-plain a {
    margin: .1rem;
    background-color: #fff;
    color: #222;
    font-weight: 600;
    border-radius: 8px;
}

.mp-sidebar-nav li.mp-nav-plain a:hover {
    background-color: #eee;
    color: #000;
}


.mp-sidebar-nav li a {
    display: block;
    padding: 0.75rem 1.25rem;
    color: var(--mp-text);
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s;
}

.mp-sidebar-nav li a:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.mp-sidebar-nav li a.active {
    background-color: var(--mp-accent);
    color: #fff;
}

/* Sidebar Search */
.mp-nav-search {
    padding: 0.5rem 1rem 1rem;
}

.mp-nav-search form {
    display: flex;
    gap: 0.25rem;
}

.mp-nav-search input[type="text"] {
    flex: 1;
    padding: 0.5rem;
    font-size: 0.9rem;
    border: 1px solid var(--mp-border);
    border-radius: 4px;
    background-color: var(--mp-bg-input);
    color: var(--mp-text);
}

.mp-nav-search button {
    padding: 0.5rem 0.75rem;
    background-color: var(--mp-accent);
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* Sidebar User Info */
.mp-nav-user {
    padding: 0.5rem 1.25rem 1rem;
    font-size: 0.85rem;
    color: var(--mp-text-muted);
}

.mp-nav-user a {
    color: var(--mp-link);
}

/* Expandable Nav Items */
.mp-nav-expandable {
    position: relative;
}

.mp-nav-toggle {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mp-nav-arrow {
    font-size: 0.8rem;
    transition: transform 0.2s ease;
}

.mp-nav-expandable.open .mp-nav-arrow {
    transform: rotate(180deg);
}

/* Split nav: label link + separate arrow toggle */
.mp-nav-split {
    display: flex;
    align-items: center;
    margin: .1rem;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
}
.mp-nav-split-link {
    flex: 1;
    color: #222 !important;
    font-weight: 600;
}
.mp-nav-split-link:hover {
    background-color: #eee !important;
    color: #000 !important;
}
.mp-nav-split-arrow {
    flex: 0 0 auto;
    padding: 0.75rem 1rem !important;
    display: flex;
    align-items: center;
    color: #888 !important;
}
.mp-nav-split-arrow:hover {
    background-color: #eee !important;
    color: #222 !important;
}

.mp-nav-submenu {
    display: none;
    background-color: rgba(0, 0, 0, 0.15);
    padding-left: 0;
}

.mp-nav-expandable.open .mp-nav-submenu {
    display: block;
}

.mp-nav-submenu li a {
    padding: 0.5rem 1.25rem 0.5rem 2rem;
    font-size: 0.9rem;
    color: var(--mp-text-muted);
}

.mp-nav-submenu li a:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.05);
}
.mp-nav-submenu .thumbsimg {
    width: 23px;
    height: 23px;
    vertical-align: middle;
}
.mp-nav-submenu li a.mp-nav-manage {
    font-size: 0.8rem;
    font-style: italic;
    opacity: 0.7;
}
.mp-nav-submenu li a.mp-nav-manage:hover {
    opacity: 1;
}

/* Support Link */
.mp-nav-support a {
    background-color: var(--mp-link) !important;
    color: #fff !important;
    font-weight: 600;
    margin: 0.5rem 1rem;
    border-radius: 4px;
    text-align: center;
}

.mp-nav-support a:hover {
    background-color: var(--mp-link-hover) !important;
}

/* Utility Links - plain text style */
.mp-nav-utils {
    padding: 0.75rem 1.25rem;
    font-size: 0.85rem;
    color: var(--mp-text-muted);
    border-top: 1px solid var(--mp-border);
    margin-top: 0.5rem;
}

.mp-nav-utils a {
    color: var(--mp-text-muted);
    background: none;
    padding: 0;
    display: inline;
}

.mp-nav-utils a:hover {
    color: var(--mp-link);
    background: none;
}

/* Sidebar Toggle Button */
.mp-sidebar-toggle {
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 101;
    background-color: var(--mp-accent);
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    font-size: 1.2rem;
    transition: left 0.3s ease, background-color 0.2s;
}

.mp-sidebar-toggle:hover {
    background-color: var(--mp-accent-hover);
}

.mp-sidebar:not(.collapsed) ~ .mp-main .mp-sidebar-toggle,
.mp-sidebar:not(.collapsed) ~ .mp-sidebar-toggle {
    left: calc(var(--mp-sidebar-width) + 1rem);
}

/* Main Content */
.mp-main {
    flex: 1;
    margin-left: var(--mp-sidebar-width);
    transition: margin-left 0.3s ease;
    min-height: 100vh;
}

.mp-sidebar.collapsed ~ .mp-main {
    margin-left: 0;
}

.mp-content {
    padding: .2rem 0rem .2rem 2rem; 
    max-width: 900px;
}

/* ============================================
   Page Elements
   ============================================ */
.pageHelp {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 0.75rem 1rem;
    background-color: var(--mp-bg-sidebar);
    border-radius: 4px;
    border-left: 3px solid var(--mp-accent);
    font-size: 1.1rem;
}

.pageHelp-current {
    color: #fff;
    font-weight: 500;
}

/* ============================================
   Forms
   ============================================ */
.form_element {
    margin-bottom: 1.25rem;
}

.form_element label {
    display: block;
    font-weight: 500;
}

.form_element i {
    font-size: 0.85rem;
    font-style: italic;
    color: var(--mp-text-muted);
}

input, select, textarea {
    font-family: "Ubuntu", sans-serif;
    background-color: var(--mp-bg-input);
    color: var(--mp-text);
    border: 1px solid var(--mp-border);
    border-radius: 4px;
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
    width: 100%;
    max-width: 500px;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--mp-accent);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"] {
    height: 2.5rem;
}

input[type="checkbox"],
input[type="radio"] {
    width: auto;
    margin-right: 0.5rem;
}

textarea {
    min-height: 150px;
    resize: vertical;
}

button,
input[type="submit"] {
    font-family: "Ubuntu", sans-serif;
    background-color: var(--mp-accent);
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 0.625rem 1.25rem;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

button:hover,
input[type="submit"]:hover {
    background-color: var(--mp-accent-hover);
}

/* ============================================
   Tag Selection (editTrack)
   ============================================ */
.tagSelectContainer {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

#parentTags,
#childTags {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--mp-border);
    border-radius: 4px;
    background-color: var(--mp-bg-input);
    min-height: 200px;
}

#parentTags {
    max-width: 250px;
}

#parentTags option {
    padding: 0.25rem;
}

#childTags {
    background-color: rgba(255, 255, 255, 0.02);
}

#childTags label {
    display: block;
    margin-bottom: 0.25rem;
}

/* ============================================
   File Upload / Drop Zone
   ============================================ */
.track-files-page {
    max-width: 800px;
}

.files-list {
    margin-bottom: 1.5rem;
}

.file-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background-color: var(--mp-bg-sidebar);
    border: 1px solid var(--mp-border);
    border-radius: 4px;
}

.file-row .nicname {
    width: 150px;
    flex-shrink: 0;
}

.file-row .file-name {
    flex: 1;
    color: var(--mp-text-muted);
    font-size: 0.9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-row .delete-link {
    color: #E77D42;
    font-size: 0.85rem;
}

.file-row .delete-link:hover {
    color: #f09a66;
}

#drop-area {
    border: 3px dashed var(--mp-accent);
    border-radius: 8px;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: rgba(81, 139, 161, 0.05);
    margin: 1.5rem 0;
}

#drop-area:hover {
    border-color: var(--mp-accent-hover);
    background-color: rgba(81, 139, 161, 0.1);
}

#drop-area.dragover {
    border-color: #4ade80;
    background-color: rgba(74, 222, 128, 0.1);
    transform: scale(1.02);
}

#drop-area h3 {
    margin: 0 0 0.5rem 0;
    color: #fff;
    font-size: 1.25rem;
}

#drop-area p {
    margin: 0;
    color: var(--mp-text-muted);
}

#drop-area .drop-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--mp-accent);
}

#progress-bar {
    width: 100%;
    height: 24px;
    background-color: var(--mp-bg-sidebar);
    border: 1px solid var(--mp-border);
    border-radius: 12px;
    overflow: hidden;
    margin: 1rem 0;
    display: none;
}

#progress-bar.active {
    display: block;
}

#progress {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--mp-accent) 0%, #6aa3b7 100%);
    border-radius: 12px;
    transition: width 0.3s ease;
    position: relative;
}

#progress::after {
    content: attr(data-percent);
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 500;
}

.upload-status {
    text-align: center;
    padding: 1rem;
    color: var(--mp-text);
}

.upload-status.success {
    color: #4ade80;
}

.upload-status.error {
    color: #f87171;
}

/* ============================================
   Flash Messages
   ============================================ */
.flash-message {
    padding: 12px 20px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-weight: 500;
}

.flash-success {
    background-color: #1a4d2e;
    color: #4ade80;
    border: 1px solid #22c55e;
}

.flash-error {
    background-color: #4d1a1a;
    color: #f87171;
    border: 1px solid #ef4444;
}

.flash-info {
    background-color: #1a3d4d;
    color: #60a5fa;
    border: 1px solid #3b82f6;
}

.flash-warning {
    background-color: #4d3d1a;
    color: #fbbf24;
    border: 1px solid #f59e0b;
}

/* ============================================
   Track Action Buttons
   ============================================ */
.track-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 1rem;
}

/* Base button style for track actions */
.track-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

/* Like and Bookmark buttons - light blue accent */
.track-actions .btn.thumbsup,
.track-actions .btn.bookmark {
    background-color: transparent;
    border-color: var(--mp-accent);
    padding: 0.5rem 0.75rem;
    opacity: 0.5;
}

.track-actions .btn.thumbsup:hover,
.track-actions .btn.bookmark:hover {
    background-color: var(--mp-accent);
    transform: translateY(-2px);
    opacity: 0.8;
}

/* Active state - user has already liked/bookmarked */
.track-actions .btn.thumbsup.active,
.track-actions .btn.bookmark.active {
    opacity: 1;
    background-color: var(--mp-accent);
    border-color: var(--mp-accent);
}

.track-actions .btn.thumbsup.active:hover,
.track-actions .btn.bookmark.active:hover {
    opacity: 1;
    background-color: var(--mp-accent-hover);
    border-color: var(--mp-accent-hover);
}

.track-actions .btn .thumbsimg {
    width: 20px;
    height: 20px;
}

.track-actions .btn.active .thumbsimg {
    filter: brightness(1.2);
}

/* Edit and Admin buttons - orange link color */
.track-actions .btn.edit-btn,
.track-actions .btn.admin-btn {
    background-color: var(--mp-link);
    color: #fff;
    border-color: var(--mp-link);
}

.track-actions .btn.edit-btn:hover,
.track-actions .btn.admin-btn:hover {
    background-color: var(--mp-link-hover);
    border-color: var(--mp-link-hover);
    transform: translateY(-2px);
    text-decoration: none;
}

/* ============================================
   Footer
   ============================================ */
.mp-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--mp-border);
    color: var(--mp-text-muted);
    font-size: 0.85rem;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
    .mp-sidebar {
        margin-left: calc(-1 * var(--mp-sidebar-width));
    }

    .mp-sidebar.open {
        margin-left: 0;
    }

    .mp-main {
        margin-left: 0;
    }

    .mp-sidebar-toggle {
        left: 1rem !important;
    }

    .mp-sidebar.open ~ .mp-sidebar-toggle {
        left: calc(var(--mp-sidebar-width) + 1rem) !important;
    }

    .tagSelectContainer {
        flex-direction: column;
    }

    #parentTags {
        max-width: 100%;
    }

    h3.pageTitle {
        font-size: 1.5rem;
    }
}

/* ============================================
   Tags (Track Detail & Image Detail Pages)
   ============================================ */
.track-tags,
.image-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0 1.5rem 0;
}

.track-tags .tag,
.image-tags .tag {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    font-size: 0.85rem;
    color: var(--mp-text);
    background: linear-gradient(135deg, rgba(81, 139, 161, 0.15) 0%, rgba(81, 139, 161, 0.08) 100%);
    border: 1px solid rgba(81, 139, 161, 0.25);
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.2s ease;
    letter-spacing: 0.02em;
}

.track-tags .tag:hover,
.image-tags .tag:hover {
    color: #fff;
    background: linear-gradient(135deg, rgba(81, 139, 161, 0.3) 0%, rgba(81, 139, 161, 0.18) 100%);
    border-color: rgba(81, 139, 161, 0.5);
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(81, 139, 161, 0.15);
}

/* ============================================
   Artist List Page
   ============================================ */
.artist-list-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 1rem;
}

.artist-list-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.artist-list-item > a {
    font-size: 1.15em;
    font-weight: 500;
}

.artist-list-banner {
    margin-top: 0.4rem;
}

.artist-list-banner img {
    max-width: 1000px;
    width: 100%;
    border-radius: 4px;
}
