@import url('https://fonts.googleapis.com/css2?family=Teachers:ital,wght@0,400..800;1,400..800&display=swap');

:root
{
    --main-background: #2E2633;
    --content-background: #3A3241;
    --light-background: #3A3241;
    --text-color: #FFFFFF;
    --secondary-text-color: #BBBBBB;
    --highlight-color: #1F1B24;
    --highlight-hover: #2A2633;
    --accent-color: #4E4A59;
    --accent-dark: #383540;
    --footer-background: #1F1B24;
    --error-color: #FF4D4D;
    --border-color: #656071;
    --title-color: #E0A96D;

    --info-background: #E0A96D; /* Soft gold to contrast with the dark background */
    --info-border: #C1853B; /* Darker shade of gold for border */
}


/* Titles and Headings */
h1, h2, h3, h4, h5, h6
{
    color: var(--title-color);
    margin: 20px 0;
    font-weight: bold;
}


h1 a, h2 a, h3 a, h4 a, h5 a, h6 a
{
    color: inherit;
    /* text-decoration: underline; */
    transition: text-decoration-thickness 0.2s;
}


h1 a:hover, h2 a:hover, h3 a:hover, h4 a:hover, h5 a:hover, h6 a:hover
{
    text-decoration: underline;
    text-decoration-thickness: 2px;
}

hr
{
    border: 0px;
    border-top: 1px dotted var(--border-color);
    margin: 20px 0px;
}


/* Main Body */
body, html
{
    font-family: "Teachers", sans-serif;
    font-optical-sizing: auto;
    margin: 0;
    padding: 0;
    height: 100%;
    background-color: var(--main-background);
    color: var(--text-color);
}

body
{
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}


a
{
    color: var(--secondary-text-color);
    text-decoration: none;
    font-weight: bold;
}

a:hover
{
    color: var(--text-color);
}

.main-container
{
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    flex: 1;
}

.content
{
    flex: 1;
}


/* Header */
header
{
    background-color: var(--highlight-color);
    color: var(--text-color);
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0px;
}

header .logo img
{
    height: 100px;
}

.header-content
{
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background-color: var(--highlight-color);
    color: var(--text-color);
    width: 100%;
}

/* Footer */
.footer
{
    background-color: var(--footer-background);
    color: var(--text-color);
    text-align: center;
    position: relative;
    padding: 10px 0px;
    width: 100%;
    margin-top: auto;
}

.footer a
{
    font-weight: normal;
}


/* Main Nav */
nav
{
    text-align: right;
}

nav ul
{
    list-style-type: none;
    margin: 0;
    padding: 0;
}

nav ul li
{
    display: inline;
    margin-right: 20px;
}

nav ul li a
{
    color: var(--text-color);
    text-decoration: none;
}

nav ul li a:hover
{
    text-decoration: underline;
}

/* Info Box */
.info-note
{
    position: relative;
    display: flex;
    align-items: center;
    background-color: var(--info-background);
    border-left: 50px solid var(--info-border);
    padding: 20px;
    margin: 10px auto;
    border-radius: 5px;
    width: 65%;
    box-sizing: border-box;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

.info-note a
{
    color: var(--text-color);
    text-decoration: underline;
}

.info-note h1, .info-note h2, .info-note h3, .info-note h4, .info-note h5, .info-note h6
{
    color: var(--text-color);
}

.info-note-icon
{
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%) translateX(-140%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

.info-note-svg
{
    width: 100%;
    height: 100%;
    fill: var(--text-color);
}

.info-note-content
{
    margin-left: 8px;
    color: var(--text-color);
}


/* Error Message */
.error-message
{
    text-align: center;
    color: var(--error-color);
    font-weight: bold;
    margin: 0;
}


/* Account Form Container */
.account-form-container
{
    width: 300px;
    margin: 100px auto;
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 5pt;
    background-color: var(--content-background);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}


/* Button Styling */
button
{
    font-family: "Teachers", sans-serif;
    font-optical-sizing: auto;
    font-weight: bold;

    background-color: var(--accent-color);
    border: 1px solid var(--accent-color);
    color: var(--text-color);

    padding: 4px 10px;

    border-radius: 4px;
    cursor: pointer;
}

button:hover
{
    background-color: var(--highlight-hover);
    border: 1px solid var(--highlight-hover);
    color: var(--text-color);
}


/* Invitation Styling */
.invite-list
{
    display: flex;
    flex-direction: column;
    gap: 8pt;
    width: 100%;
}

.invite-row
{
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 4px 0;
}

.invite-token
{
    word-break: break-all;
    font-family: monospace;
    color: var(--secondary-text-color);
}

.invite-button
{
    flex-shrink: 0;
}

.invite-usedby
{
    flex: 1 1 200px;
}


/* Form Styling */
form
{
    margin: 0px;
}

input, select, textarea
{
    width: 100%;
    padding: 10px;
    margin: 10px 0px 10px 0px;
    box-sizing: border-box;
    border: 1px solid var(--accent-dark);
    border-radius: 4px;
    background-color: var(--accent-color);
    color: var(--text-color);
    text-align: left;
}

input[type="submit"], input[type="button"]
{
    background-color: var(--accent-color);
    border: 1px solid var(--accent-color);
    font-weight: bold;
    color: var(--text-color);
    cursor: pointer;
    text-align: center;
}

input[type="submit"]:hover, input[type="button"]:hover
{
    background-color: var(--highlight-hover);
    border: 1px solid var(--border-color);
    color: var(--text-color);
}

textarea
{
    resize: none;
    height: 125px;
}


/* Dashboard Navigation */
.dashboard-nav
{
    background-color: var(--accent-dark);
    padding: 10px 20px;
    text-align: right;
    box-sizing: border-box;
    border: 1pt solid black;
}

.dashboard-nav ul
{
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: inline-block;
}

.dashboard-nav ul li
{
    display: inline;
    margin-right: 20px;
}

.dashboard-nav ul li a
{
    color: var(--text-color);
    text-decoration: none;
    padding: 5px 10px;
}

.dashboard-nav ul li a:hover
{
    background-color: var(--accent-color);
    text-decoration: none;
}


/* Page Content Container */
.content-container
{
    width: 70%;
    /*max-width: 1200px;*/
    margin: 20px auto 20px;
    padding: 20px;
    background-color: var(--content-background);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

.content-container .error
{
    text-align: center;
    font-weight: bold;
    margin: 0;
}

.content-container .error h1, .content-container .error h2, .content-container .error h3, .content-container .error h4, .content-container .error h5, .content-container .error h6
{
    text-align: center;
    color: var(--error-color);
    font-weight: bold;
    margin: 0;
}

.log-context-box
{
    background-color: var(--highlight-color);
    color: var(--text-color);
    padding: 10px;
    border-radius: 8px;
    max-height: 200px;
    overflow-y: auto;
    font-family: monospace;
    white-space: pre-wrap;
}


.user-profile-picture
{
    margin: 20px 0;
    text-align: center;
}

.user-profile-picture img
{
    border-radius: 50%;
    border: 2px solid var(--highlight-color);
    object-fit: cover;
    margin-right: 40px;
    float: left;
}


/* Item Detail */
.featured-photo
{
    float: right;
    margin-top: 20px;
    max-width: 128px;
    max-height: 128px;
    object-fit: contain;
    border-radius: 5px;
}

.photo-management-links
{
    margin-top: 0.5em;
    float: right;
    display: inline-block;
}

.item-details p
{
    margin: 10px 0;
    line-height: 1.5;
    color: var(--secondary-text-color);
}

.item-details strong
{
    color: var(--text-color);
}

.details-columns
{
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 20px;
}

.details-column
{
    flex: 1;
    min-width: 300px;
}


/* Search Decoration */
.search-form
{
    display: flex;
    align-items: center;
}

.search-form input,
.search-form button
{
    height: 40px;
    box-sizing: border-box;
}

.search-form input
{
    padding: 0 10px;
    border: 1px solid var(--accent-dark);
    border-right: none;
    border-radius: 3px 0 0 3px;
    outline: none;
    flex-grow: 1;
}

.search-form button
{
    background-color: var(--accent-color);
    border: 1px solid var(--highlight-color);
    border-radius: 0 3px 3px 0;
    color: var(--text-color);
    cursor: pointer;
    padding: 0 10px;
}

.search-form button:hover
{
    background-color: var(--highlight-hover);
    border-color: var(--highlight-hover);
}


/* List and list item styling for search results */
.results-list
{
    list-style-type: none;
    padding: 0;
}

.result-item
{
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

.result-item:last-child
{
    border-bottom: none;
}

.result-item h3
{
    margin: 0 0 10px;
}

.result-item a
{
    text-decoration: none;
    color: var(--text-color);
}

.result-item p
{
    color: var(--secondary-text-color);
}


/* Homepage Search Decoration */
.homepage-search-form
{
    display: flex;
    width: 100%;
    align-items: center;
}

.homepage-search-form input,
.homepage-search-form button
{
    height: 60px;
    box-sizing: border-box;
}

.homepage-search-form input
{
    flex-grow: 1;
    padding: 15px;
    border: 1px solid var(--accent-dark);
    border-radius: 5px 0 0 5px;
    font-size: 1.2em;
    outline: none;
}

.homepage-search-form button
{
    padding: 0 20px;
    background-color: var(--highlight-color);
    color: var(--text-color);
    border: none;
    border-radius: 0 5px 5px 0;
    font-size: 1.2em;
    cursor: pointer;
}

.homepage-search-form button:hover
{
    background-color: var(--highlight-hover);
}


/* User */
.badge
{
    display: inline-block;
    text-align: center;
    background-color: var(--highlight-color);
    color: var(--title-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    box-shadow: 0 4px 4px rgba(0, 0, 0, 0.2);
    padding: 4px 15px;
    font-size: 0.7em;
    font-weight: bold;
}

.user-action-link
{
    text-align: right;
}

.user-collection-management-link
{
    text-align: right;
    margin-top: 10px 0px;
}

.user-collection-management-link a
{
    color: var(--secondary-text-color);
    text-decoration: none;
    font-weight: bold;
}


/* Active sorted table */
.sorted-asc::after
{
    content: "▲";
    margin-left: 5px;
}

.sorted-desc::after
{
    content: "▼";
    margin-left: 5px;
}

thead tr
{
    white-space: nowrap;
}

thead tr a
{
    color: var(--text-color);
}

/* Pagination styling */
.pagination
{
    display: flex;
    justify-content: center;
    margin-top: 20px;
}


.pagination a
{
    padding: 8px 16px;
    margin: 0 4px;
    background-color: var(--accent-color);
    text-decoration: none;
    color: var(--secondary-text-color);
    border-radius: 4px;
}

.pagination a.active
{
    background-color: var(--accent-color);
    border: 2px solid var(--border-color);
    color: var(--text-color);
}

.pagination a:hover
{
    background-color: var(--highlight-hover);
    color: var(--text-color);
}



/* Profile */
.image-select-container
{
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.image-select-container label
{
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}

.image-select-container img
{
    border: 2px solid transparent;
    border-radius: 5px;
    width: 50px;
    transition: border-color 0.3s ease;
}

.image-select-container input[type="radio"]
{
    display: none;
}

.image-select-container input[type="radio"]:checked + label img
{
    border-color: #3a66a3;
}


/* Collection Table Styling */
.collection-table
{
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 1em;
    font-family: "Teachers", sans-serif;
    box-shadow: 0 5px 5px rgba(0, 0, 0, 0.1);
}

.collection-table th, .collection-table td
{
    padding: 12px 15px;
    text-align: right;
    color: var(--secondary-text-color);
}

.collection-table th:first-child, .collection-table td:first-child
{
    text-align: left;
}

.collection-table th
{
    background-color: var(--highlight-color);
    color: var(--text-color);
    font-weight: bold;
}

.collection-table tr
{
    border-bottom: 1px solid var(--border-color);
    text-align: right;
}


/* Button styling for the Edit and Remove buttons */
.collection-table input[type="submit"]
{
    background-color: var(--accent-color);
    color: var(--text-color);
    border: none;
    padding: 2px 2px;
    cursor: pointer;
    border-radius: 3px;
    font-size: 0.7em;
    margin: 0 5px;
}

.collection-table input[type="submit"]:hover
{
    background-color: var(--highlight-hover);
}


/* Dashboard */
.quick-actions
{
    margin-top: 5px;
}

.quick-actions h3
{
    padding: 0px;
    margin-bottom: 0px;
}

.quick-actions ul
{
    list-style-type: none;
    margin-top: 5px;
}

.quick-actions ul li
{
    margin-bottom: 2px;
    padding: 0px 2px;
    display: inline-block;
}

.quick-actions ul li a
{
    color: var(--text-color);
    background-color: var(--accent-color);
    display: inline-block;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    padding: 5px 20px;
}

.quick-actions ul li a:hover
{
    background-color: var(--highlight-hover);
}

.dashboard-container
{
    background-color: var(--light-background);
    padding: 15px;
    border-radius: 5px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    clear: left;
}

.recent-activity ul
{
    list-style-type: none;
    padding: 0px;
    margin: 0px;
}

.recent-activity ul li
{
    padding: 10px;
    background-color: var(--light-background);
    color: var(--secondary-text-color);
}

.recent-activity ul li:hover
{
    background-color: var(--highlight-hover);
}

.recent-activity ul a
{
    color: var(--text-color);
}
