/*
    MerchStudio version 0.01 - Core CSS File
    Copyright (c) 2025 Michael Lewis White and MerchStudio Inc.
    Client Side CSS for MerchStudio App
    @version client/css/client.css - 0.01 - 05-14-2025 - totaltec

    # included by client/css_load.tpl
*/

/**
 * Header Section
 */
#logo_row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#logo_wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/*
=========================================
Header Tools (Shared Structure)
=========================================
*/
.header_tools {
    display: flex;
    align-items: center;
    gap: 16px;
}

.head_action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    text-decoration: none;
    color: inherit;
}

.head_icon_wrap {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    position: relative;
}

.head_action .merch_icon {
    width: 35px;
    height: 35px;
}

.head_label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1;
}

/* User Dropdown Specifics */
.drop_user {
    padding: 10px 16px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 4px;
}

.drop_name {
    font-weight: 600;
    font-size: 0.9rem;
}

.drop_email {
    font-size: 0.75rem;
    color: var(--middle_grey); }

/* Remove default link styling for the logo area */
a.logo_link,
a.logo_link:link,
a.logo_link:visited,
a.logo_link:active,
a.logo_link:focus {
    text-decoration: none;
    color: inherit;
}

#logo {
    display: inline-block;
    margin: 5px 5px 0 0;
    padding: 3px;
    width: auto;
    height: 90px;
    vertical-align: middle;
}

#logo > svg,
#logo > img {
    display: block;
    height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.phone {
    margin: 0 15px;
    align-self: center;
    white-space: nowrap;
}

/* Control link styling for login and phone links */
#login_link,
#login_link:link,
#login_link:visited,
.phone a,
.phone a:link,
.phone a:visited {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
}

#login_link:hover,
#login_link:focus,
.phone a:hover,
.phone a:focus {
    color: var(--link_hover);
    text-decoration: underline;
}

#header_user_column {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 5px;
}

.drop_trigger {
    transition: all 0.2s ease-out;
}

.drop_trigger:hover {
    background-color: var(--hover);
    border-color: var(--highlight);
}



/*
=========================================
Footer Links (from Nexus Menu)
=========================================
*/

/* Container for the footer links navigation within #merch_footer */
#merch_footer .footer_links {
    text-align: center; /* Center the list of links */
    padding: 10px 0;
    /* Optional: a subtle line above these links */
    border-top: 1px solid var(--base);
    margin-top: 10px;
}

#merch_footer .footer_links ul {
    list-style-type: none; /* Remove default bullets */
    padding: 0;
    margin: 0;
    display: inline-block; /* Allows centering via parent's text-align */
}

#merch_footer .footer_links li {
    display: inline-block; /* Arrange links horizontally */
    margin: 0 10px;       /* Spacing between link items */
}

/* Styling for the actual anchor tags in the footer links menu */
#merch_footer .footer_links a,
#merch_footer .footer_links a:visited {
    color: var(--text); /* Using theme's base text color for subtlety */
    text-decoration: none;
    font-size: 0.9em;    /* Slightly smaller than main footer text */
    padding: 3px 0;      /* Small vertical padding for click area */
}

#merch_footer .footer_links a:hover,
#merch_footer .footer_links a:focus {
    color: var(--link_hover); /* Use theme's link hover color */
    text-decoration: underline;
}

/* Styling for the existing bottom row of the footer */
#merch_footer .footer_bottom {
    text-align: center;
    padding: 10px 0 15px 0; /* Ensure enough padding at the very bottom */
    font-size: 0.85em;     /* Keep this text small */
}

#merch_footer .footer_bottom .powered_by,
#merch_footer .footer_bottom .copyright {
    display: inline;
    margin: 0 5px; /* Space if they are side-by-side or wrap */
}

/* --- Sub-Path Navigation (Node Kids) --- */
.sub_path_nav {
    margin-top: 30px;    /* Space above this navigation block */
    margin-bottom: 30px; /* Space below this navigation block */
    padding-bottom: 20px;
    border-bottom: 1px solid var(--base);
}

.sub_path_nav.bottom {
    padding-top: 20px;
    border-top: 1px solid var(--base);
}

.sub_path_list {
    list-style-type: none;
    padding: 0;
    margin: 0;
    display: grid;
    /* Creates responsive columns: each takes 1fr of space,
       but won't shrink below 180px, and will wrap. */
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px; /* Spacing between the navigation items */
}

.sub_path_item a,
.sub_path_item a:link,
.sub_path_item a:visited {
    display: block; /* Makes the entire area clickable */
    text-decoration: none;
    color: var(--text);
    padding: 15px;
    border-radius: 6px;
    background-color: transparent;
    transition: background-color 0.2s ease-in-out,
                transform 0.2s ease-in-out;
    text-align: center; /* Centers the image and text below it */
}

.sub_path_item a:hover,
.sub_path_item a:focus {
    background-color: var(--base);
    color: var(--link_hover);
    transform: translateY(-2px); /* Subtle lift effect */
    box-shadow: 0 4px 8px rgba(0,0,0,0.05); /* Subtle shadow */
}

.sub_path_item svg,
.sub_path_image {
    display: block;
    width: 160px;
    height: 160px;
    object-fit: cover;
    margin: 0 auto 10px auto;
    border-radius: 4px;
    border: 1px solid var(--line); /* Subtle border */
}

.sub_path_name {
    display: block;
    font-size: 1em;
    font-weight: 500;
    line-height: 1.3;
}

/* --- My Designs Gallery Modal --- */

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

.design_row {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius, 4px);
    background-color: var(--bg-panel);
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

/* Hover state for the whole row so it feels clickable */
.design_row:hover {
    background-color: var(--bg-hover, rgba(0,0,0,0.02));
    border-color: var(--accent);
}

.design_thumbnail {
    width: 80px;
    height: 80px;
    flex-shrink: 0; /* Prevents the thumbnail from squishing on small screens */
    background: rgba(0,0,0,0.03);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 4px;
}

.design_thumbnail img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.empty_thumb {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}

.empty_thumb svg {
    width: 40px;
    height: 40px;
    opacity: 0.3;
}

.design_details {
    flex-grow: 1; /* Pushes the delete button all the way to the right */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.design_name {
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 1rem;
    color: var(--text-main);
}

.design_size {
    font-size: 0.85rem;
}

/* Specific styling for the delete icon so it doesn't look like a standard heavy button */
.btn_delete_design {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    color: var(--text-muted);
    transition: color 0.2s ease, background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Danger color exclusively on hover */
.btn_delete_design:hover {
    color: #e74c3c;
    background-color: rgba(231, 76, 60, 0.1);
}

.no_designs_msg {
    padding: 20px;
    text-align: center;
    font-style: italic;
}


/* Mobile Size */
@media (max-width: 800px) {
    .phone {
        margin: 5px 0 0 0;
        font-size: 0.8em;
    }
}