:root {
    --hover-background-color: #f8f9fa;
}

html {
    overflow-y: visible; /* Never make it scroll or auto, otherwise mobile Safari will throw `this page was reloaded...`*/
}

#header div.header {
    margin: 0 auto;
    max-width: 64rem;
}

#body {
    max-width: 64rem;
    margin: 0 auto;
    padding: 1rem 1rem calc(1rem + 12vh) 1rem;
}

#footer {
    position: fixed;
    bottom: 0;
    height: 12vh;
    padding-top: 0;
    background-color: rgb(33, 37, 41);
    color: white;
    font-size: 1.4em;
    width: 100%;
    z-index: 9999;
}

#footer .footer-dock {
    max-width: 64rem;
    margin: 0 auto;
}

@font-face {
    src: url('/fonts/NexonMaplestoryLight-cb8461024534fedf61adb0edf57fbe11.woff2') format('woff2');
    font-display: swap;
    font-family: 'NexonMaplestory';
    font-weight: 300;
    font-style: normal;
}

@font-face {
    src: url('/lib/bootstrap/bootstrap-icons-1.11.0/fonts/bootstrap-icons-adc119571f0673e6063bd596679b6ee5.woff2') format('woff2');
    font-display: swap;
    font-family: 'Bootstrap Icons';
    font-weight: normal;
    font-style: normal;
}

[v-cloak] {
    display: none;
}

body {
    font-family: NexonMaplestory, sans-serif;
    --bs-body-font-family: NexonMaplestory;
}

body a {
    text-decoration: none;
    color: inherit;
}

body a:hover {
    text-decoration: none;
    color: inherit;
}

.row-7 {
    display: flex;
    flex-wrap: wrap;
}

.row-7 > * {
    width: 14.28571428571429%;
}

.calendar .day-of-the-week {
    width: 100%;
    padding-left: 0;
}

.day-of-the-week {
    margin-top: 1rem;
    background: #eee;
}

.day-of-the-week > div {
    text-align: center;
    padding: 0.5rem;
    border: 1px solid black;
}

.day-of-the-week abbr[title] {
    border: none;
    font-weight: 800;
    text-decoration: none;
}

.day-grid .DAY {
    border: 1px solid black;
    word-break: break-all;
    min-height: 9vw;
    padding: 0 0 5px;
}

.day-grid .DAY.has-schedule:not(.month-next):not(.month-prev) {
    filter: brightness(90%);
}

.day-grid .month-prev,
.day-grid .month-next {
    filter: opacity(0.6);
}

.day-grid.editable .DAY:hover {
    cursor: pointer;
    filter: opacity(0.8);
}

/* Color picker styles */
.color-picker-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 10px;
}

.color-picker-container label {
    font-weight: bold;
    font-size: 0.9em;
    margin-bottom: 5px;
}

.color-picker-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.color-picker {
    width: 100%;
    max-width: 300px;
    border-radius: 8px;
}

.pickr {
    position: relative;
}

.pickr .pcr-app {
    position: static !important;
    display: block !important;
    visibility: visible !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    margin-top: 5px;
}

.pickr .pcr-button {
    display: none !important;
}

.swal2-popup .pickr .pcr-app {
    width: 100% !important;
    max-width: 280px !important;
    font-size: 0.85em;
    margin: 0 auto;
}

.swal2-popup .color-picker-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.swal2-popup .color-picker {
    width: 100%;
    max-width: 280px;
}

/* Monolith theme specific adjustments */
.swal2-popup .pickr .pcr-app.monolith {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.swal2-popup .pickr .pcr-app.monolith .pcr-selection {
    height: 160px !important;
}

.color-preview-container {
    display: flex;
    align-items: center;
    margin-top: 5px;
    font-size: 1.5em;
}

.color-preview {
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: bold;
}

.color-preview span {
    color: rgba(0, 0, 0, 0.7);
}

.day-grid .month-prev, .day-grid .month-next {
    background-color: #fff;
}

h1 a {
    color: #333;
    text-decoration: none;
    font-weight: bold;
}

h1 a:hover {
    color: black;
}

h1 a.move:hover {
    font-weight: bold;
    color: black;
}

.text-right {
    text-align: right !important;
}

.btn-outline-dark.selected:disabled {
    border: 3px dotted red;
}

.text-align-left {
    text-align: left !important;
}

.text-align-center {
    text-align: center !important;
}

.text-align-right {
    text-align: right !important;
}

.day-grid .date {
    padding: 0;
    text-align: center;
    width: 100%;
}

.day-grid .date .d-day-count {
    font-size: 0.8em;
}

.date .day-header {
    margin-top: 5px;
}

.date .day {
    margin-left: 5px;
    font-size: 1.2em;
}

.day-grid .holiday .day,
.day-of-the-week > div:nth-child(7n+1) abbr,
.day-grid > div:nth-child(7n+1) .day {
    color: red;
}

.day-grid > div:not(.holiday):nth-child(7n) .day,
.day-of-the-week > div:nth-child(7n) abbr {
    color: blue;
}

.my-team .today {
    border: 3px dashed red !important;
}

.my-team .selected {
    border: 3px solid red !important;
}

.day-grid .today,
.day-grid .searchDay {
    border: 3px solid red !important;
}

.my-team .today .day,
.day-grid .today .day {
    text-decoration: underline;
    text-underline-offset: 0.2em;
    text-decoration-color: red;
    text-decoration-thickness: 0.1em;
    font-weight: bolder;
}

.homeButton {
    font-size: 1.7em;
    color: #ccc;
}

a.homeButton:hover {
    color: white;
}

.duty-table-header {
    font-size: 1.3em;
    margin: 0 auto;
    display: flex;
}

.duty-type .indicator {
    margin-left: 5px;
    border: 2px solid #eaeaea;
}

.duty-table-header .buttons {
    margin-left: auto;
    color: black;
}

.duty-types .duty-type {
    margin-right: .7rem;
}

.duty-types .duty-type .indicator {
    padding: 2px;
}

.duty-types .duty-type-count {
    margin-left: 2px;
    width: 1rem;
}

.month-control {
    text-align: center;
    margin: 0;
}

.month-control .info {
    background-color: #eee;
    padding: 5px 15px;
    margin: 10px 0;
    border-radius: 15px;
    width: fit-content;
}

.month-control-left {
    text-align: left;
    padding-left: 0;
}

.month-control-right {
    text-align: right;
}

.month-control-right .with-person-icon {
    padding-left: 2.5rem;
}

.month-control-right .search-person-icon {
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    pointer-events: none;
    z-index: 10;
}

.link {
    color: unset;
}

.link:hover {
    cursor: pointer;
}

.login-box {
    max-width: 50%;
    margin: 100px auto 0;
}

.login-box .sso-login:hover {
    cursor: pointer;
    filter: brightness(95%);
}

.day-grid {
    padding-left: 0;
    width: 100%;
}

.members {
    padding: 20px;
    font-size: 2.5em;
}

.d-day-item .d-day_menu {
    text-align: right;
}

.d-day-item .d-day_day {
    font-size: 1.5em;
    font-weight: bold;
    text-align: center;
    padding-top: 10px;
}

.d-day-item p {
    font-size: 1.2em;
}

.add_modal input {
    width: 80%;
}

.d-day-list .d-day-item {
    height: 90%;
    max-height: 120px;
}

.d-day-list .d-day-item.selected {
    border: 3px solid lightpink;
    filter: brightness(90%);
}

.d-day-list .d-day-private {
    background-color: mistyrose;
}

.d-day-item .d-day_day .pretty {
    font-size: 0.8em;
}

.hidden {
    display: none;
}

.swal2-html-container {
    overflow-x: hidden;
}

/* Desktop SweetAlert modal optimizations */
.mobile-optimized-modal {
    font-size: 16px !important;
    max-width: 450px !important;
}

.mobile-optimized-modal .mobile-title {
    font-size: 18px !important;
    font-weight: 600 !important;
    margin-bottom: 15px !important;
}

.mobile-optimized-modal .mobile-content {
    font-size: 16px !important;
    line-height: 1.5 !important;
}

.mobile-optimized-modal .swal2-input {
    font-size: 16px !important;
    padding: 12px !important;
    border-radius: 8px !important;
    border: 2px solid #e9ecef !important;
}

.mobile-optimized-modal .swal2-confirm,
.mobile-optimized-modal .swal2-cancel {
    font-size: 16px !important;
    padding: 12px 24px !important;
    border-radius: 8px !important;
    font-weight: 500 !important;
}

.swal2-html-container form {
    text-align: left;
}

.date .duty {
    width: 100%;
    margin: 0;
}

.duty .duty-type {
    margin: 0;
    padding: 0;
    height: 2em;
}

.duty .duty-type button {
    width: 100%;
    margin-bottom: 0.5em;
}

.duty_type-list .duty-type:hover {
    cursor: pointer;
    background-color: aliceblue;
}

.calendar .date .holiday-info,
.date .schedules .schedule {
    text-align: left;
    line-height: 2;
    margin-left: 5px;
    border-top: 2px dashed white;
}

.date .holiday-info span.holiday {
    color: red;
}

.calendar .date .schedule {
    font-size: 1em;
}

#detail-view-modal .schedules {
    min-height: 350px;
}

#detail-view-modal .schedules .schedule {
    border-radius: 15px;
    padding: 10px 20px;
    margin: 10px;
}

.schedules .schedule .schedule-content {
    line-height: 1.5;
    margin: 0;
    padding: 0;
}

#detail-view-modal .schedules .schedule.schedule-add-button {
    padding: 0;
}

#detail-view-modal .schedule i.has-description {
    display: none;
}

.schedule-edit {
    display: grid;
}

.schedule-edit .content-length {
    font-size: 0.6em;
    color: #333;
}

.schedule-edit textarea {
    font-size: 1em;
}

.schedule-edit .schedule-field-row {
    margin-bottom: 0;
}

.schedule-edit .schedule-field-label {
    flex: 0 0 6.25rem;
    font-weight: 500;
}

.schedule-edit .schedule-field-control {
    flex: 1 1 0;
    min-width: 0;
    width: 100%;
}

.schedule-edit .schedule-field-control .form-control {
    margin-bottom: 0;
}

@media (max-width: 576px) {
    .schedule-edit .schedule-field-label {
        width: 100%;
    }
}

.schedule-tags {
    text-align: right;
}

.schedule-tag {
    font-size: 0.8em;
    padding: 0 0.2em;
    border-radius: 15px;
    margin: 0 0.025em;
    border: 1px solid black;
    background-color: floralwhite;
    width: fit-content;
    white-space: nowrap;
    display: inline-block
}

.schedule-tag ul.dropdown-menu {
    max-height: 200px;
    overflow-y: auto;
}

#detail-view-modal .schedule-tag:hover {
    cursor: pointer;
}

#detail-view-modal input,
#detail-view-modal textarea {
    margin-bottom: 0.5em;
}

.schedule-tag::after,
.schedule-tag::before {
    font-family: 'Bootstrap Icons', serif;
    position: relative;
    top: 3px;
}

.schedule-tag.tagged-true::before {
    font-family: unset;
    font-size: 0.6em;
    margin-right: 0.1em;
    content: 'by';
    top: 0;
}

.schedule-tag::before {
    content: '\F4DA';
}

#detail-view-modal .schedule-tag.tagged-false::before {
    content: none;
}

#detail-view-modal .schedule-tag.tagged-false::after {
    content: '\F622';
}

.schedule-tag.schedule-tag-add {
    display: none;
}

.schedule-tag.schedule-tag-add select {
    border: none;
    width: 3.5em;
    background: floralwhite;
    -webkit-appearance: none;
}

.schedule-tag.schedule-tag-add::before {
    content: none;
    margin: 0;
}

#detail-view-modal .schedule-tag-add {
    display: inline-block;
    line-height: 1.5;
}

.schedules .schedule small {
    font-size: 0.75em;
}

#detail-view-modal .schedules .schedule .buttons {
    text-align: right;
}

.navbar {
    font-size: 1.5em;
    color: rgba(255, 255, 255, 0.55);
}

.navbar .nav-right {
    color: white;
    position: fixed;
    top: 20px;
    right: 20px;
}

.nav-item {
    margin-right: 10px;
}

.navbar-brand {
    margin-left: 1em;
}

.privacy-config .btn.selected {
    border: 3px solid #000;
    position: relative;
}

.border-red {
    border: 2px solid red;
}

.sso-logins .sso-icon {
    width: 50px;
    height: 50px;
}

.member-info th {
    background-color: #eee;
}

.todo-container {
    border: 1px solid black;
    border-radius: 10px;
    padding: 0 5px 0 0;
}

#add-todo-btn {
    width: 9rem;
    border-right: 1px solid #dee2e6;
    background-color: #22c55e;
    color: white;
    border-radius: 10px 0 0 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid black;
}

#todo-list-container {
    display: flex;
    overflow: hidden;
    padding-top: 0.3rem;
    padding-bottom: 0.3rem;
}

#todo-list {
    overflow-x: auto;
}

.todo-item {
    flex: 0 0 auto;
    display: flex;
    background-color: var(--hover-background-color);
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-left: 0.5rem;
    transition: background-color 0.3s;
    position: relative;
    user-select: none;
    cursor: pointer;
    align-items: center;
}

.todo-item .handle,
.todo-overview-item .handle {
    padding: 0.3rem;
    cursor: grab;
    font-size: 1.25rem;
    border-right: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    justify-content: center;
}

.todo-item:hover {
    background-color: #e2e8f0;
}

.todo-text {
    margin-left: 0.5rem;
    margin-right: 0.5rem;
}

.todo-item.dragging {
    opacity: 0.5;
}

.todo-overview-item.completed {
    background-color: #f3f4f6;
    color: #6c757d;
    opacity: 0.8;
}

.todo-overview-meta button {
    white-space: nowrap;
}

.todo-overview-meta {
    min-width: 220px;
}

.todo-empty-inline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    color: #6c757d;
    min-height: 46px;
    border: 1px dashed #cbd5e1;
    border-radius: 0.75rem;
    background-color: #f8fafc;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.todo-empty-inline:hover {
    background-color: #e8f4f8;
    border-color: #94a3b8;
}

.btn-tag {
    border-radius: 999px;
    border: none;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #495057;
    background-color: #e9ecef;
    transition: opacity 0.2s ease;
}

.btn-tag-active {
    background-color: #e7f1ff;
    color: #0b5ed7;
}

.btn-tag-active.active {
    background-color: #0d6efd;
    color: #fff;
}

.btn-tag-completed {
    background-color: #e9f7f0;
    color: #08664a;
}

.btn-tag-completed.active {
    background-color: #198754;
    color: #fff;
}

.btn-tag-total {
    background-color: #f1f3f5;
    color: #495057;
}

.btn-tag-total.active {
    background-color: #495057;
    color: #fff;
}

.btn-tag:not(.active) {
    opacity: 0.6;
}

.count-badge {
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 1rem;
    padding: 0 0.5rem;
    font-weight: 700;
    min-width: 1.5rem;
    text-align: center;
}

.todo-overview-item.completed .fw-semibold {
    color: #555;
}

.todo-overview-btn {
    border: 1px solid #d0d7e2;
    background-color: #ffffff;
    border-radius: 999px;
    padding: 0.35rem 0.9rem;
    font-weight: 600;
    color: #495057;
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.todo-overview-btn:hover {
    background-color: #f1f3f5;
    border-color: #c0c7d2;
}

.todo-overview-icon {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    background-color: #e7f1ff;
    color: #0d6efd;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.todo-overview-count {
    background-color: #0d6efd;
    color: #fff;
    border-radius: 999px;
    padding: 0 0.6rem;
    font-size: 0.85rem;
    font-weight: 700;
}

.todo-overview-label {
    font-size: 0.95rem;
}

input[readonly], textarea[readonly] {
    background-color: var(--hover-background-color);
    cursor: not-allowed;
}

.search-bar {
    height: 100%;
}

.search-bar input {
    border-radius: 10px 0 0 10px;
}

.search-bar .btn {
    border-radius: 0 10px 10px 0;
}

.monthSelector-header {
    padding-right: 0;
}

.monthSelector-header div {
    padding-right: 0;
}

.monthSelector-header button {
    border-radius: 15px;
}

.month-control .currentCalendar,
.month-control input {
    font-size: 2.5em;
}

.month-control span,
.month-control .monthSelector-header button,
.month-control .move {
    font-size: 2em;
}

.month-control .year-month-btn,
.month-control i,
.month-control .month-btn,
.month-control a {
    font-size: 1.5em;
}

.monthSelector button.active {
    background-color: #0d6efd;
}

.monthSelector .year-month-btn,
.monthSelector .year-month-btn:active,
.monthSelector .year-month-btn:hover {
    border: none;
    background: none;
}

.monthSelector .dropdown-menu {
    left: -10% !important;
}

.monthSelector .dropdown-menu .month-btn {
    padding: 20px;
}

#search-result-modal .search-result-row:hover {
    cursor: pointer;
    background-color: #e2e8f0;
}

.position-relative {
    position: relative !important;
}

.schedule small.help-note {
    font-size: 0.6em;
    position: absolute;
    right: 15px;
    margin-top: 10px;
}

.DAY .schedule .schedule-description {
    display: none;
}

.month-control .today-button {
    border: none;
    background-color: lightskyblue;
}

.cursor-pointer {
    cursor: pointer;
}

.hover-bg-light:hover {
    background-color: var(--hover-background-color);
}

.member-card {
    transition: transform 0.2s ease-in-out;
}

.member-card:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    background-color: var(--hover-background-color);
}

.blue {
    color: dodgerblue;
}

.red {
    color: orangered;
}

.friend-section .handle {
    cursor: grab;
}

.footer-dock .link {
    position: relative;
    display: inline-block;
    padding-top: 1rem;
    padding-bottom: 1rem;
    transition: background-color 0.2s ease;
}

.footer-dock .link:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 60%;
    width: 1px;
    background-color: rgba(255, 255, 255, 0.15);
    transition: opacity 0.2s ease;
}

.footer-dock .link:hover::after,
.footer-dock .link.active::after,
.footer-dock .link:has(+ .link:hover)::after,
.footer-dock .link:has(+ .link.active)::after {
    opacity: 0;
}

.footer-dock .link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.footer-dock .link.active {
    background-color: rgba(255, 255, 255, 0.2);
}

.footer-dock .link.active:hover {
    background-color: rgba(255, 255, 255, 0.25);
}

.member-vue td {
    padding-top: 1em;
    padding-bottom: 1em;
}

.row-cols-7 > * {
    flex: 0 0 auto;
    width: 14.28571428571429%;
}

.modal-body {
    max-height: 580px;
    overflow-y: scroll;
}

.other-duties .other-duty {
    border-style: solid;
}

.friend-selector {
    cursor: pointer;
}

.friend-card,
.friend-card * {
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
}

.friend-card:hover {
    background-color: #e2e8f0;
}

.attachment-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.attachment-tile {
    position: relative;
    flex: 0 0 120px;
    width: 120px;
    height: 120px;
    margin-bottom: 3rem;
}

.attachment-thumb {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 0.75rem;
    background-color: #f8f9fa;
    border: 1px dashed #dee2e6;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.attachment-thumb img,
.attachment-thumb svg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.attachment-thumb svg {
    padding: 1rem;
    box-sizing: border-box;
    fill: #6c757d;
}

.attachment-meta {
    margin-top: 0.5rem;
}

.attachment-name {
    font-size: 0.85rem;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.attachment-size {
    font-size: 0.75rem;
    color: #6c757d;
}

.attachment-progress {
    height: 4px;
}

.attachment-remove {
    position: absolute;
    top: 0.35rem;
    right: 0.35rem;
    padding: 0.25rem 0.5rem;
    font-size: 1rem;
    line-height: 1;
    z-index: 10;
    opacity: 0.9;
}

.attachment-remove:hover {
    opacity: 1;
}

.attachment-download {
    top: 0.35rem;
    right: 0.35rem;
    padding: 0.25rem 0.5rem;
    font-size: 1rem;
    line-height: 1;
    z-index: 10;
    opacity: 0.7;
    background-color: rgba(0, 0, 0, 0.6);
    border: none;
    transition: all 0.2s ease;
}

.attachment-download:hover {
    opacity: 1;
    background-color: rgba(0, 0, 0, 0.8);
}

.attachment-viewer-popup {
    max-width: min(1000px, 90vw);
    padding: 0;
}

.attachment-viewer-title {
    color: #f8f9fa;
    text-align: left;
}

.attachment-viewer-html {
    padding: 0;
    margin: 0;
}

.attachment-viewer-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 0.5rem;
}

.attachment-viewer-close {
    color: #f8f9fa;
}

.attachment-viewer-body {
    display: flex;
    justify-content: center;
    max-height: 80vh;
    overflow: auto;
}

.attachment-hover-overlay {
    opacity: 0;
    background-color: rgba(0, 0, 0, 0.5);
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.attachment-thumbnail-clickable:hover .attachment-hover-overlay {
    opacity: 1;
}
