/* === Fonts === */
@font-face {
    font-family: 'ubuntu';
    src: url('/0/fonts/ubuntu-r.woff2') format('woff2'),
        url('/0/fonts/ubuntu-r.woff') format('woff');
        
}
@font-face {
    font-family: 'ubuntu-thin';
    src: url('/0/fonts/ubuntu-th-webfont.woff') format('woff');
    font-weight: 100;
    font-style: normal;
}

/* === Scrollbar Styling === */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar:horizontal {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #ffdc9c;
}

::-webkit-scrollbar-thumb {
    background: #62492a;
    border-radius: 6px;
    border: 2px solid #3f2a1a;
}

::-webkit-scrollbar-thumb:hover {
    background: #9a995d;
}

/* === Base Styling === */
body {
    font-family: 'ubuntu', sans-serif;
      -webkit-font-smoothing: antialiased;
    background-color: #f4eed7;
    color: #3f2a1a;
    margin: 0;
    overflow: hidden;
}

/* === Headings === */
h1,
h2,
h3 {
    font-family: 'ubuntu', sans-serif;
    font-weight: bold;
    margin: 0;
    display: inline-block;
    line-height: 1;
    color: #5a3e2b;
}


/* === Alignment Utilities === */
.center,
.left,
.right {
    display: block;
}

.center {
    text-align: center;
}

.left {
    text-align: left;
}

.right {
    text-align: right;
}

/* === Layout Elements === */
main {
    overflow: auto;
    max-height: calc(100vh - 112px);
/*    margin: 102px 0 10px 0; */
}


footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #3f2a1a;
    color: #f4eed7;
    text-align: center;
    font-size: 12px;
    line-height: 10px;
    padding: 0;
    z-index: 999;
    display: flex;
    justify-content: space-between;
}


footer a {
    text-decoration: none;
    color: #f4eed7;
    line-height: 10px;
}

.footleft,
.footright {
    flex-grow: 1;
    padding: 0 5px;
}

.footleft {
    text-align: left;
}

.footright {
    text-align: right;
}

/* === Header === */
header {
    position: fixed;
    top: 0;
    left: 102px;
    width: calc(100% - 102px);
    background-color: #333;
    padding: 0 20px;
    min-height: 102px;
    box-sizing: border-box;
    border-bottom: 2px solid #3f2a1a;
    box-shadow: 0px 4px 6px rgba(63, 42, 26, 0.5);
    color: #dccb87;
    z-index: 999;
    /* Ensures it stays above everything */
}

.headercenter {
    width: 100%;
    text-align: center;
    margin: 0 auto;
    padding: 10px 0 10px 0;
}

.headerright {
    position: absolute;
    top: 0;
    right: 20px;
    min-width: 180px;
    text-align: right;
    font-size: 1em;
    line-height: 1.2em;
}

.headlogo {
    height: 100px;
    width: 100px;
    position: absolute;
    top: 0;
    left: 0;
    border-bottom: 2px solid #3f2a1a;
    border-right: 2px solid #3f2a1a;
}

header h1,
header h2 {
    text-align: center;
    display: block;
}

header h1 {
    font-size: 4rem;
    font-weight: bold;
    color: #dccb87 !important;
    text-align: center;
    text-shadow: -2px -2px 0 #3f2a1a, 2px -2px 0 #3f2a1a, -2px 2px 0 #3f2a1a, 2px 2px 0 #3f2a1a;
}

header h2 {
    font-size: 0.8rem;
    font-style: italic;
    font-weight: lighter;
}

hr {
    border: 2px solid #3f2a1a;
    border-radius: 5px;
    /* Optional, for sharp edges */
    margin: 2px;
}



/* === Shared Block Styles === */
.page-block {
    margin-left: 102px;
    text-align: center;
    border-radius: 8px;
    border: 2px solid #3f2a1a;
    box-shadow: 0 5px 15px rgba(80, 34, 3, 0.3);
    padding: 20px;
}

/* === Specific Page Styling === */
#pubview_sidebar,
#lectorview_sidebar,
#settings_sidebar {
    font-family: 'ubuntu-thin';
    width: 100px;
    position: fixed;
    top: 102px;
    left: 0;
    bottom: 0;
    background-color: #ffdc9c;
    border-right: 2px solid #3f2a1a;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    z-index: 999;
    overflow-y: auto;
    /* Add this line */
    overflow-x: hidden;
    /* Optional: prevent horizontal scroll */
}

.login-box {
    align-self: center;
}

#pubview_block,
#lectorview_block,
#settings_block {
    margin-left: 102px;
    text-align: center;
    border-radius: 8px;
    border: 2px solid #3f2a1a;
    box-shadow: 0 5px 15px rgba(80, 34, 3, 0.3);
    padding: 20px;
    min-width: 400px;
    max-width: 100%;
}
#pubview_block:not(#lectorview_block, #settings_block),
#lectorview_block:not(#pubview_block, #settings_block),
#settings_block:not(#pubview_block, #lectorview_block) {
    margin-left: 102px;
}

#pubview_sidebar button,
#lectorview_sidebar button,
#settings_sidebar button {
    display: block;
    width: 100%;
    background-color: #62492a;
    color: #deb887;
    border-bottom: 2px solid #3f2a1a;
    padding: 10px 0;
    font-size: 1.1em;
    text-align: center;
    cursor: pointer;
}

#pubview_sidebar button:hover,
#lectorview_sidebar button:hover,
#settings_sidebar button:hover {
    color: #3f2a1a;
    background-color: #9a995d;
}

#pubview_sidebar button.active,
#lectorview_sidebar button.active,
#settings_sidebar button.active {
    background-color: #9a995d;
    color: #3f2a1a;
    font-size: .9em;
    transition: background-color 0.3s ease, color 0.3s ease, font-size 0.3s ease;
}


.pubview_block_div,
.lectorview_block_div,
.settings_block_div {
    text-align: center;
    border-radius: 8px;
    border: 2px solid #3f2a1a;
    box-shadow: 0 5px 15px rgba(80, 34, 3, 0.3);
    padding: 20px;
    max-width: 100%;
}

/* === Content Pages*/
.contentpage_block {
    text-align: center;
    border-radius: 8px;
    border: 2px solid #3f2a1a;
    box-shadow: 0 5px 15px rgba(80, 34, 3, 0.3);
    padding: 20px;
}

.contentpage_block h1 {}

.contentpage_block h2 {}

.contentpage_block h3 {}

.contentpage_block p {
  margin: 0;
  padding: 0;
}

/* === Settings Specific === */
#logoutBtn,
#pubview_block button,
#settings_block button,
#lectorview_block button {
    font-size: 14px;
    padding: 6px 12px;
    background-color: #d4c4b0;
    color: #2e2e2e;
    border: 1px solid #5a3e2b;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out, transform 0.1s ease-in-out;
}

#logoutBtn:hover,
#settings_block button:hover,
#lectorview_block button:hover {
    background-color: #b89f7a;
    transform: scale(1.02);
}

.settings_buttons,
.settings_title {
    padding: 0;
    width: 100%;
    text-align: center;
}

.settings_title {
    margin-bottom: 10px;
    font-size: 2.5em;
    font-weight: bold;
    color: #5a3e2b;
    text-shadow: 1px 1px 3px rgba(63, 42, 26, 0.4);
    letter-spacing: 1px;
}

.settings_buttons {
    margin-top: 10px;
}

.settings_table {
    border: 3px solid #5a3e2b;
    border-collapse: collapse;
    border-radius: 5px;
    font-size: .8em;
    margin: 0 auto;
}

.settings_table th,
.settings_table td {
    border: 1px solid #5a3e2b;
    padding: 0 0 0 2px;
}

.settings_table thead {
    background-color: #5a3e2b;
    color: white;
    font-weight: bold;
}

.settings_table tbody {
    background-color: #f4eed7;
}

.settings_table tbody tr:nth-child(even) {
    background-color: #d4c8a2;
}

.settings_table tbody tr:hover {
    background-color: #e8b36d !important;
}

.settings_table .settinginactive {
    background-color: #3f3f3f !important;
    color: #d1d1d1 !important;
    font-style: italic;
    opacity: 0.85;
}

#colorsSettings_table td,
#colorsSettings_table th {
    padding: 4px;
}

#colorsSettings_table th {
    border:#dccb87;
}

/* === Modal === */
.modal-settings {
    display:none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.modal-content {
    position: relative;
    z-index: 2;
    padding: 20px;
    margin: 0 auto;
    background-color: #f4eed7;
    border-radius: 12px;
    border: 3px solid #5a3e2b;
    box-shadow: 0 15px 400px rgba(80, 34, 3, 0.9);
}



/* === Form Inputs === */
input[type="text"],
input[type="password"],
input[type="date"],
input[type="number"],
textarea {
    background-color: #fefaef;
    color: #3f2a1a;
    font-family: 'ubuntu', sans-serif;
    font-size: 0.95em;
    padding: 6px 8px;
    border: 2px solid #5a3e2b;
    border-radius: 5px;
    box-shadow: inset 0 1px 2px rgba(80, 34, 3, 0.1);
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    box-sizing: border-box;
}

input[type="text"]:focus,
input[type="date"]:focus,
input[type="number"]:focus,
textarea:focus {
    border-color: #9a995d;
    outline: none;
    box-shadow: 0 0 0 2px rgba(154, 153, 93, 0.35);
}

input[type="number"] {
    width: 100px;
}

textarea {
    resize: vertical;
    min-height: 80px;
}

/* === Select Dropdown === */
select {
    background-color: #f4eed7;
    color: #3f2a1a;
    font-family: 'ubuntu', sans-serif;
    font-size: 0.95em;
    padding: 6px 8px;
    padding-right: 34px;
    margin-top: 2px;
    border: 2px solid #5a3e2b;
    border-radius: 5px;
    box-shadow: 0 2px 6px rgba(80, 34, 3, 0.10);
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image:
        linear-gradient(135deg, transparent 60%, #9a995d 60%);
    background-position: right 14px top 55%, right 8px top 55%;
    background-size: 8px 8px, 16px 16px;
    background-repeat: no-repeat;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.1s;
}

select:hover {
    background-color: #ffe6b0;
    border-color: #9a995d;
    transform: scale(1.01);
}

select:focus {
    outline: none;
    border-color: #9a995d;
    box-shadow: 0 0 0 2px rgba(154, 153, 93, 0.25);
}
/* === Checkbox and Radio Buttons === */
input[type="checkbox"],
input[type="radio"] {
    accent-color: #62492a;
    width: 16px;
    height: 16px;
    cursor: pointer;
    vertical-align: middle;
    border: 2px solid #3f2a1a;
    border-radius: 3px;
}

/* === Labels === */
label {
    font-family: 'ubuntu', sans-serif;
    font-size: 0.95em;
    color: #3f2a1a;
    cursor: pointer;
    margin-right: 12px;
    user-select: none;
}

