:root{
    --modal-content-background-color: #fff;
    --placement-font-color: #757575;
    --calendar-icon: url('/caddy/images/icons/calendar/Light Date icon.png');
}

body.dark {
    --modal-content-background-color: #141314;
    --calendar-icon: url('/caddy/images/icons/calendar/Dark Date icon.png');
}

/* Modal background overlay */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    inset: 0;
    background-color: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px;
    overflow: hidden;
    box-sizing: border-box;
}

.modal-content {
    background-color: var(--modal-content-background-color);
    color: var(--font-color);
    padding: 20px;
    border: 2px solid var(--background-color);
    border-radius: 12px;
    width: 400px;
    max-width: min(80%, 960px);
    max-height: calc(100vh - 32px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    position: relative;
    overflow-y: auto;
    box-sizing: border-box;
}

.modal-content h2{
    margin-top: 0;
    color: var(--secondary-color);
    font-weight: 800;
    font-size: 1.5rem;
}

/* Header text */
.modal-content h2 {
    margin-top: 0;
    color: var(--secondary-color);
    font-weight: 700;
    font-size: 1.5rem;
    margin-bottom: 0;
}

.modal-content label {
    display: block;
    margin-top: 10px;
    font-weight: 600;
}

.modal-content input,
.modal-content input:focus,
.modal-content input:active {
    min-width: 96.5%;
    padding: 8px;
    margin-top: 5px;
    font-size: .9rem;
    font-weight: 500;
    border: 2px solid var(--background-color);
    border-radius: 6px;
    color: var(--font-color);
    background-color: var(--background-color) !important;
    outline: none;
    box-shadow: none;
}

.modal-content select {
    width: 100%;
    padding: 8px;
    margin-top: 5px;
    font-size: .9rem;
    font-weight: 500;
    border: 2px solid var(--background-color);
    border-radius: 6px;
    background-color: var(--background-color);
    margin-right: 5px;
    color: var(--font-color);
}

.modal-content input:focus {
    border-color: var(--sub-background-color);
    outline: none;
}

/* Compile Modal */
.download-group {
    margin-bottom: 1rem;
}

.download-group h3 {
    margin: 0 0 0.4rem 0;
    font-size: 1rem;
}

.download-options {
    display: grid;
    grid-template-columns: 150px 150px; /* Two equal-width columns */
    gap: 10px 20px; /* row gap, column gap */
}

.download-options label {
    display: flex;
    align-items: center;
    gap: 6px; /* Space between checkbox and text */
}

/* Wrapper for input + icon */
.date-input-wrapper {
  position: relative;
  width: 100%;
}

/* Date Input Styling */
.modal-content input#projectDate {
  width: 95%;
  border: 1px solid var(--accent-color);
  border-radius: 6px;
  background-color: var(--modal-content-background-color);
  color: var(--font-color);
  font-size: .9rem;
  font-weight: 500;
  cursor: pointer;
}

.modal-content input#projectDate:focus {
  border-color: var(--accent-color-strong);
  outline: none;
}

/* Real clickable calendar icon */
.calendar-icon {
  position: absolute;
  right: 10px;
  top: 55%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  background-image: var(--calendar-icon);
  background-size: cover;
  background-repeat: no-repeat;
  cursor: pointer;
}

/* Flatpickr popup styling */
.flatpickr-calendar {
  background: var(--background-color) !important;
  border: 1px solid var(--accent-color) !important;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}
/* Days */
.flatpickr-day {
  color: var(--font-color) !important;
}
.flatpickr-day:hover {
  background: var(--secondary-color) !important;  
  color: var(--background-color) !important;  
}
.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange,
.flatpickr-day.inRange {
  background: var(--primary-accent-color) !important;
  color: var(--background-color) !important;  
  font-weight: bold !important;
}
/* Weekday labels (Sun–Sat) */
span.flatpickr-weekday {
  background: var(--background-color) !important;
  color: var(--font-color) !important;
  font-weight: 600 !important;
  padding: 4px 0 !important;
  border: none !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
}
/* Month bar */
.flatpickr-months .flatpickr-month {
  background: var(--secondary-accent-color) !important;
  color: var(--font-color) !important;
  border-radius: 2px 2px 0 0 !important;
  padding: 2px 0 !important;
}
/* Month dropdown */
.flatpickr-monthDropdown-months {
  background: var(--secondary-accent-color) !important;
  color: var(--font-color) !important;
  padding: 2px 6px !important;
  font-weight: bold !important;
  cursor: pointer !important;
}
.flatpickr-monthDropdown-months option {
  background: var(--background-color) !important;
  color: var(--font-color) !important;
  text-align: center !important;
}
/* Year input */
.flatpickr-current-month .numInputWrapper input {
  background: transparent !important;
  color: var(--font-color) !important;
  font-weight: bold !important;
  border: none !important;
  outline: none !important;
  text-align: center !important;
  padding-right: 10px !important;
}
.flatpickr-current-month .numInputWrapper span {
  margin-left: 10px !important; 
}
/* Year up/down arrows */
.flatpickr-current-month .numInputWrapper span.arrowUp:after,
.flatpickr-current-month .numInputWrapper span.arrowDown:after {
  border-bottom-color: var(--font-color) !important;
  border-top-color: var(--font-color) !important;
}
/* Arrows */
.flatpickr-prev-month, 
.flatpickr-next-month {
  color: var(--font-color) !important;
  fill: var(--font-color) !important;
}

.required-star {
  color: red;
  margin-left: 4px;
  font-weight: bold;
}

#dropdownSelected{    
    position: relative;
    width: 95%;
    padding: 8px;
    margin-top: 5px;
    font-size: .9rem;
    font-weight: 400;
    border: 2px solid var(--background-color);
    border-radius: 6px;
    background-color: var(--modal-content-background-color);
    color: var(--placement-font-color);

    img{
        opacity: .7;
        position: absolute;
        right: 10px;
        top: 50%;
        transform: translateY(-50%);
        width: 10px;
        height: 10px;
    }
}

#dropdownSelected:hover {
    cursor: pointer;
    opacity: 1;
}

#dropdownList{
    display: none;
    position: relative;
    z-index: 1000;
    background-color: var(--modal-content-background-color);
    border: 2px solid var(--background-color);
    border-radius: 6px;
    width: 99%;
    max-height: 200px;
    overflow-y: auto;
}

.dropdown-option {
    padding: 8px;
    font-size: .9rem;
    font-weight: 500;
    color: var(--font-color);
    border: none;
}

.dropdown-option:hover {
    background-color: var(--secondary-accent-color);
    color: var(--font-color);
    cursor: pointer;
}

.modal-content button:not(.custom-dropdown-trigger):not(.custom-dropdown-option):not(.de-copy-project-nav-btn) {
    margin-top: 15px;
    background-color: var(--sub-background-color);
    color: var(--font-color);
    font-weight: 600;
    min-width: 100px;
    padding: 10px 20px;
    border: 1.5px solid var(--secondary-accent-color);
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.modal-content:not(.duplicate-project-modal):not(.modal-two-tone-question-wrap) button:not(.custom-dropdown-trigger):not(.custom-dropdown-option):hover {
    border: 1.5px solid var(--primary-color);
}

.modal-content.modal-two-tone .modal-form .custom-dropdown-trigger {
    min-height: 40px;
    height: 40px;
    padding: 0 32px 0 12px;
    background: var(--background-color);
}

.button-row, .project-button-row {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.modal-content p {
  white-space: pre-line; 
}

/* Close button (X) */
.close {
    color: var(--font-color);
    position: absolute;
    top: 14px;
    right: 16px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    margin: 0;
    float: none;
    z-index: 5;
}

.modal-content.modal-two-tone > .close {
    top: 16px;
    right: 18px;
}

.modal-content.modal-two-tone > h2 {
    padding-right: 56px;
}

/* Close hover effect */
.close:hover {
    color: var(--secondary-color);
}

/* Action button inside modal */
.modal-action {
    margin-top: 15px;
    background-color: var(--secondary-color);
    color: var(--font-color);
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.modal-action:hover {
    background-color: var(--secondary-accent-color);
}

/* Scrollbar Styling */
.dropdown-list::-webkit-scrollbar {
  width: 6px;
}
.dropdown-list::-webkit-scrollbar-track {
  background: transparent;
}
.dropdown-list::-webkit-scrollbar-thumb {
  background-color: var(--accent-color);
  border-radius: 4px;
}
.dropdown-list::-webkit-scrollbar-thumb:hover {
  background-color: var(--background-color);
}
.dropdown-list::-webkit-scrollbar-button {
  display: none;
  height: 0;
}
.dropdown-list {
  scrollbar-color: var(--background-color);
}

/* shared project log */
.chat-modal {
    width: 600px;
    max-height: 80vh;
    overflow: hidden;
}

.chat-log-container {
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 10px;
}

.chat-entry {
    padding: 12px;
    border-bottom: 1px solid #444;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    margin-bottom: 6px;
    opacity: 0.8;
}

.chat-body {
    font-size: 15px;
}

/* unread dot on logs */
.chat-entry.unread {
    background-color: rgba(210, 63, 63, 0.08);
}

.chat-entry .chat-meta {
    font-size: 0.8rem;
    opacity: 0.8;
    display: flex;
    align-items: center;
    gap: 6px;
}

.chat-unread-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background-color: var(--primary-accent-color, #d23f3f);
    flex-shrink: 0;
}

.chat-entry .chat-message {
    margin-top: 2px;
}

.modal-form textarea {
    width: 100%;
    min-height: 110px;
    padding: 0.75rem 0.9rem;
    border: 1px solid var(--accent-color);
    border-radius: 8px;
    font: inherit;
    line-height: 1.4;
    color: var(--font-color);
    background: var(--background-color);
    resize: vertical;
    box-sizing: border-box;
}

.modal-form textarea:focus-visible {
    outline: none;
}

.modal-form input,
.modal-form textarea {
    margin-top: 0.35rem;
}

.estimate-material-choice-option {
    display: block;
    margin-bottom: 0.75rem;
    cursor: pointer;
}

.estimate-material-choice-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.estimate-material-choice-card {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border: 1px solid var(--accent-color);
    border-radius: 10px;
    background: var(--background-color);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.estimate-material-choice-option:hover .estimate-material-choice-card {
    border-color: var(--primary-accent-color);
    background: color-mix(in srgb, var(--secondary-accent-color) 8%, var(--background-color));
}

.estimate-material-choice-option input[type="radio"]:checked + .estimate-material-choice-card {
    border-color: var(--primary-accent-color);
    background: color-mix(in srgb, var(--secondary-accent-color) 14%, var(--background-color));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--secondary-accent-color) 18%, transparent);
}

.estimate-material-choice-dot {
    width: 18px;
    height: 18px;
    margin-top: 0.1rem;
    border: 2px solid var(--accent-color);
    border-radius: 50%;
    background: var(--background-color);
    position: relative;
    flex: 0 0 18px;
    box-sizing: border-box;
}

.estimate-material-choice-option input[type="radio"]:checked + .estimate-material-choice-card .estimate-material-choice-dot {
    border-color: var(--primary-accent-color);
}

.estimate-material-choice-option input[type="radio"]:checked + .estimate-material-choice-card .estimate-material-choice-dot::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary-accent-color);
    transform: translate(-50%, -50%);
}

.estimate-material-choice-content {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.estimate-material-choice-content strong {
    font-size: 0.98rem;
    color: var(--font-color);
}

.estimate-material-choice-meta {
    font-size: 0.9rem;
    color: var(--font-color);
    opacity: 0.75;
    line-height: 1.35;
}

.estimate-material-choice-option-neither {
    margin-top: 1rem;
}

/* Two-tone modal layout */
.modal-content.modal-two-tone {
    padding: 0;
    overflow-y: auto;
    overflow-x: hidden;
    width: min(860px, 92vw);
    max-width: 92vw;
    max-height: calc(100vh - 32px);
}

.modal-content.modal-two-tone h2 {
    margin: 0;
    padding: 18px 22px;
    background: color-mix(in srgb, var(--sub-background-color) 78%, var(--background-color) 22%);
    border-bottom: 1px solid var(--accent-color);
}

.modal-content.modal-two-tone p {
    margin: 0;
}

.modal-content.modal-two-tone .modal-form {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 10px;
    padding-top: 5px;
    padding-right: 10px;
    align-items: start;
    background:
        linear-gradient(
            to right,
            color-mix(in srgb, var(--sub-background-color) 78%, var(--background-color) 22%) 0,
            color-mix(in srgb, var(--sub-background-color) 78%, var(--background-color) 22%) 220px,
            color-mix(in srgb, var(--background-color) 88%, black 12%) 220px,
            color-mix(in srgb, var(--background-color) 88%, black 12%) 100%
        );
}

.modal-content.modal-two-tone .modal-form > label {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 14px 18px;
    background: transparent;
    /* border-top: 1px solid var(--accent-color); */
    /* border-right: 1px solid var(--accent-color); */
    min-height: 52px;
    box-sizing: border-box;
}

.modal-content.modal-two-tone .modal-form > input,
.modal-content.modal-two-tone .modal-form > select,
.modal-content.modal-two-tone .modal-form > textarea,
.modal-content.modal-two-tone .modal-form > .date-input-wrapper,
.modal-content.modal-two-tone .modal-form > #dropdownSelected,
.modal-content.modal-two-tone .modal-form > #dropdownList,
.modal-content.modal-two-tone .modal-form > div:not(.button-row):not(.project-button-row):not(.cp-error):not(.formula-hour-button-row) {
    background: transparent;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
}

/* Two-tone question modal layout */
.modal-content.modal-two-tone.modal-two-tone-question-wrap {
    padding: 0;
    overflow-y: auto;
    overflow-x: hidden;
    width: min(860px, 92vw);
    max-width: 92vw;
    max-height: calc(100vh - 64px);
}

.modal-two-tone-question {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    position: relative;
    background:
        linear-gradient(
            to right,
            color-mix(in srgb, var(--sub-background-color) 78%, var(--background-color) 22%) 0,
            color-mix(in srgb, var(--sub-background-color) 78%, var(--background-color) 22%) 220px,
            color-mix(in srgb, var(--background-color) 88%, black 12%) 220px,
            color-mix(in srgb, var(--background-color) 88%, black 12%) 100%
        );
}

.modal-two-tone-question-left {
    padding: 18px 22px;
    border-right: 1px solid var(--accent-color);
}

.modal-two-tone-question-left h2 {
    margin: 0;
    padding: 0;
}

.modal-two-tone-question-right {
    padding: 18px 22px;
    min-width: 0;
}

.modal-two-tone-question-right p:first-child {
    margin-top: 0;
}

.modal-two-tone-question-right .button-row,
.modal-two-tone-question-right .project-button-row,
.modal-two-tone-question-right .formula-hour-button-row {
    margin-top: 1rem;
    justify-content: flex-end;
    gap: 10px;
}

.modal-content.modal-two-tone .modal-form > input,
.modal-content.modal-two-tone .modal-form > select,
.modal-content.modal-two-tone .modal-form > textarea {
    border: 1px solid var(--accent-color);
    border-radius: 8px;
    min-height: 40px;
    background: var(--background-color);
}

.modal-content.modal-two-tone .modal-form > textarea {
    min-height: 110px;
    resize: vertical;
    margin-top: 0.35rem;
}

/* Keep modal errors on the right side only */
.modal-content.modal-two-tone .modal-form > .cp-error {
    grid-column: 2;
    margin: 0;
    padding: 10px 16px 0 16px;
    background: color-mix(in srgb, var(--background-color) 88%, black 12%);
    min-width: 0;
    box-sizing: border-box;
    text-align: left;
}

.modal-content.modal-two-tone .button-row,
.modal-content.modal-two-tone .project-button-row {
    grid-column: 2;
    margin: 0;
    padding: 16px 18px 18px 18px;
    background: color-mix(in srgb, var(--background-color) 88%, black 12%);
    border-top: 1px solid var(--accent-color);
    justify-content: flex-end;
}

.modal-content.modal-two-tone .close.modal-close-hidden {
    display: none;
}

#admin-hour-existing-list {
  scrollbar-width: thin;
  scrollbar-color: var(--sub-background-color) var(--background-color);
}

#admin-hour-existing-list::-webkit-scrollbar {
  width: 12px;
}

#admin-hour-existing-list::-webkit-scrollbar-track {
  background: var(--background-color);
  border-radius: 6px;
}

#admin-hour-existing-list::-webkit-scrollbar-thumb {
  background: var(--sub-background-color);
  border-radius: 6px;
  border: 2px solid var(--background-color);
}

#admin-hour-existing-list::-webkit-scrollbar-thumb:hover {
  background: var(--accent-color);
}

.modal-content,
.modal-content.modal-two-tone,
.modal-content.modal-two-tone.modal-two-tone-question-wrap {
    scrollbar-width: thin;
    scrollbar-color: var(--sub-background-color) var(--background-color);
}

.modal-content::-webkit-scrollbar,
.modal-content.modal-two-tone::-webkit-scrollbar,
.modal-content.modal-two-tone.modal-two-tone-question-wrap::-webkit-scrollbar {
    width: 12px;
}

.modal-content::-webkit-scrollbar-track,
.modal-content.modal-two-tone::-webkit-scrollbar-track,
.modal-content.modal-two-tone.modal-two-tone-question-wrap::-webkit-scrollbar-track {
    background: var(--background-color);
    border-radius: 6px;
}

.modal-content::-webkit-scrollbar-thumb,
.modal-content.modal-two-tone::-webkit-scrollbar-thumb,
.modal-content.modal-two-tone.modal-two-tone-question-wrap::-webkit-scrollbar-thumb {
    background: var(--sub-background-color);
    border-radius: 6px;
    border: 2px solid var(--background-color);
}

.modal-content::-webkit-scrollbar-thumb:hover,
.modal-content.modal-two-tone::-webkit-scrollbar-thumb:hover,
.modal-content.modal-two-tone.modal-two-tone-question-wrap::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

/* Hide number input steppers everywhere */
input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.custom-dropdown-native {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
}

.custom-dropdown-trigger {
    min-width: 90px;
    min-height: 40px;
    padding: 8px 35px 8px 12px;
    border: 1px solid var(--accent-color);
    border-radius: 8px;
    background: var(--sub-background-color);
    color: var(--font-color);
    font: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    position: relative;
    box-sizing: border-box;
}

.custom-dropdown {
    position: relative;
    min-width: 0;
}

.modal-content.modal-two-tone .modal-form > .custom-dropdown {
    width: 100%;
    min-width: 0;
    margin: 0;
    margin-top: 0.35rem;
    background: transparent;
    box-sizing: border-box;
}

.custom-dropdown-trigger::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 12px;
    width: 10px;
    height: 10px;
    border-right: 2px solid var(--font-color);
    border-bottom: 2px solid var(--font-color);
    transform: translateY(-70%) rotate(45deg);
    pointer-events: none;
    opacity: 0.85;
}

.custom-dropdown.is-open .custom-dropdown-trigger {
    border-color: var(--primary-accent-color);
}

.custom-dropdown-label {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.custom-dropdown-menu {
    display: none;
    position: absolute;
    left: 0;
    width: max-content;
    min-width: 100%;
    max-width: min(500px, calc(100vw - 32px));
    max-height: 240px;
    overflow-y: auto;
    border: 1px solid var(--accent-color);
    border-radius: 10px;
    background: var(--background-color);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
    z-index: 2000;
    padding: 4px;
    box-sizing: border-box;
    white-space: nowrap;
}

.custom-dropdown.is-open .custom-dropdown-menu {
    display: flex;
    flex-direction: column;
}

.custom-dropdown-menu.is-portaled {
    position: fixed;
    z-index: 100000;
    display: flex;
    flex-direction: column;
}

.custom-dropdown-option:hover {
    background: var(--sub-background-color);
}

/* .custom-dropdown-option.is-selected {
    background: var(--sub-background-color);
    font-weight: 400;
} */

.custom-dropdown-option {
    width: 100%;
    padding: 6px 8px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--font-color);
    font: inherit;
    text-align: left;
    cursor: pointer;
    font-size: 15px;
    box-sizing: border-box;
}

.custom-dropdown-option:first-child {
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.custom-dropdown-option:last-child {
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

/* Custom dropdown scrollbar */
.custom-dropdown-menu {
    scrollbar-width: thin;
    scrollbar-color: var(--accent-color) var(--background-color);
}

.custom-dropdown-menu::-webkit-scrollbar {
    width: 10px;
}

.custom-dropdown-menu::-webkit-scrollbar-track {
    background: var(--background-color);
    border-radius: 999px;
}

.custom-dropdown-menu::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 999px;
    border: 2px solid var(--background-color);
}

.custom-dropdown-menu::-webkit-scrollbar-thumb:hover {
    background: var(--primary-accent-color);
}

.custom-dropdown-menu::-webkit-scrollbar-corner {
    background: transparent;
}

.admin-add-hours-now-message {
    padding: 14px 18px;
    line-height: 1.5;
    min-height: 52px;
    align-items: center;
}

.de-copy-modal-form {
    position: relative;
}

.de-copy-loading-overlay {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.28);
    border-radius: 0 0 12px 12px;
}

.de-copy-loading-overlay.hidden {
    display: none;
}

.de-copy-loading-gif {
    width: 64px;
    height: 64px;
    object-fit: contain;
    pointer-events: none;
}

.create-admin-item-manufacturer-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.create-admin-item-price-row {
    border: 1px solid var(--accent-color);
    border-radius: 10px;
    padding: 10px;
    background: var(--background-color);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.create-admin-item-price-row-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.create-admin-item-price-default-wrap {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    margin-top: 0 !important;
}

.create-admin-item-price-default-wrap input[type="radio"] {
    min-width: 16px !important;
    width: 16px;
    height: 16px;
    margin: 0;
}

.create-admin-item-price-list {
    border: 1px var(--background-color);
}

.create-admin-item-price-row .create-admin-item-price-value {
    width: 100%;
    min-width: 0 !important;
    border: 1px solid var(--accent-color) !important;
    border-radius: 8px;
    background: var(--background-color) !important;
    box-sizing: border-box;
}

.create-admin-item-price-row .create-admin-item-price-value:focus,
.create-admin-item-price-row .create-admin-item-price-value:focus-visible {
    box-shadow: none;
}









/* Fullscreen overlay */
.screensaver {
  position: fixed;
  inset: 0;
  background: var(--background-color);
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1s ease;
  z-index: 9999;
}

.screensaver.active {
  opacity: 1;
  pointer-events: auto;
}

.screensaver img {
  height: 100px;
  position: absolute;
  transform: translate(-50%, -50%) scale(1) !important;
  image-rendering: auto;
}

.custom-dropdown.is-disabled .custom-dropdown-trigger,
.custom-dropdown-trigger:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.estimate-logs-footer {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  margin-top: 1rem;
}

.estimate-logs-footer-left {
  display: flex;
  justify-content: flex-start;
}

.estimate-logs-footer-right {
  display: flex;
  justify-content: flex-end;
}

.project-updates-modal {
    width: 60vw !important;
    min-width: 600px;
    max-height: calc(100vh - 180px);
}

.project-updates-modal.modal-two-tone {
    overflow: hidden;
}

.project-updates-modal.modal-two-tone .modal-form {
    max-height: calc(100vh - 220px);
    overflow: hidden;
    min-height: 0;
    grid-template-rows:
        auto
        minmax(0, 1fr)
        auto
        auto
        auto;
}

.project-updates-title {
    padding-top: 15px;
    font-weight: bold;
    font-size: 1.3rem;
}

.project-updates-modal .project-updates-list {
    grid-column: 2;
    grid-row: 2;
    min-height: 0;
    height: 100%;
    display: flex;
    overflow-y: auto;
    gap: 8px;
    overflow-x: hidden;
    padding-top: 15px;
    padding-right: 8px;
    box-sizing: border-box;
    flex-direction: column;
}

.project-update-thread {
    display: flex;
    flex-direction: column;
}

.project-update-card {
    padding: 15px;
    border-radius: 5px;
    background: var(--sub-background-color);
}

.project-update-thread:has(.project-update-replies) > .project-update-card {
    border-bottom-right-radius: 0;
}

.project-update-replies {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-left: 26px;
    padding-left: 12px;
    border-left: 2px solid var(--accent-color);
    background: transparent;
}

.project-update-reply-card {
    padding: 12px;
    background: color-mix(in srgb, var(--sub-background-color) 70%, var(--background-color) 30%);
}

.project-update-reply-card:first-child {
    border-top-right-radius: 0;
}

.project-update-reply-card:last-child {
    border-bottom-right-radius: 5px;
    border-bottom-left-radius: 5px;
}

.project-update-reply-card + .project-update-reply-card {
    border-top: 1px solid var(--accent-color);
}

.project-update-inline-reply {
    margin-left: 26px;
    padding-left: 12px;
    border-left: 2px solid transparent;
}

.project-update-inline-reply-input {
    width: 100%;
    min-height: 38px !important;
    height: 38px;
    resize: none;
    overflow: hidden;
    box-sizing: border-box;
}

.project-update-inline-reply.is-active {
    border-left-color: var(--accent-color);
}

.project-update-inline-reply.is-active .project-update-inline-reply-input {
    min-height: 90px !important;
    height: 90px;
    resize: vertical;
    overflow-y: auto;
}

.project-update-inline-reply-actions {
    display: none;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 8px;
}

.project-update-inline-reply.is-active .project-update-inline-reply-actions {
    display: flex;
}

.project-update-inline-reply-actions button {
    min-width: auto !important;
    padding: 6px 12px !important;
    margin-top: 0 !important;
    font-size: 0.85rem;
}

.project-updates-modal textarea {
    max-height: 160px;
}

.project-updates-modal .project-button-row,
.project-updates-modal .cp-error {
    min-height: 0;
}

.project-update-compose-wrap {
  display: grid;
  grid-template-columns: 36px 1fr;
  align-items: start;
  gap: 8px;
  grid-column: 2;
}

.project-updates-modal .cp-error,
.project-updates-modal .project-button-row {
  grid-column: 2;
}

.project-update-mention-btn {
  width: 36px;
  height: 36px;
  min-width: 36px !important;
  padding: 0 !important;
  margin-top: 5px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  border-radius: 8px;
  border: 1px solid var(--accent-color);
  background: var(--sub-background-color);
  color: var(--primary-color);
  font-weight: 800;
  cursor: pointer;
}

.project-update-mention-btn:hover {
  background: var(--secondary-accent-color);
}

.project-update-mention-btn {
  margin-top: 10px !important;
}

.project-update-mention-menu {
  position: fixed;
  max-height: 260px;
  overflow-y: auto;
  border: 1px solid var(--accent-color);
  border-radius: 10px;
  background: var(--background-color);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
  z-index: 9000;
  padding: 6px;
}

.project-update-mention-option {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--font-color);
}

.project-update-mention-option:hover,
.project-update-mention-option.is-active {
  background: var(--secondary-accent-color);
}

.project-update-mention-option-name {
  font-weight: 700;
}

.project-update-mention-option-email {
  font-size: 0.78rem;
  opacity: 0.75;
}

.project-update-mention-empty {
  padding: 8px 10px;
  opacity: 0.75;
}

.project-update-mention {
  display: inline-flex;
  align-items: center;
  border: none !important;
  background: color-mix(in srgb, var(--primary-color) 14%, transparent);
  color: var(--primary-color) !important;
  padding: 1px 2px !important;
  font: inherit;
  margin-top: 0 !important;
  cursor: default !important;
}

.project-update-mention:hover {
  background: color-mix(in srgb, var(--primary-color) 24%, transparent);
}

.edit-admin-item-prices-item-label {
    padding: 10px 12px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.modal-content button:disabled,
.modal-content button.is-saving {
    opacity: 0.45;
    cursor: not-allowed !important;
    filter: grayscale(0.7);
    pointer-events: auto;
}

.modal-content button:disabled:hover,
.modal-content button.is-saving:hover {
    border-color: var(--secondary-accent-color) !important;
    background-color: var(--sub-background-color);
}

.caddy-tooltip {
    position: fixed;
    z-index: 100001;
    max-width: 320px;
    padding: 7px 9px;
    border: 1px solid var(--accent-color);
    border-radius: 8px;
    background: var(--background-color);
    color: var(--font-color);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.35;
    pointer-events: none;
    white-space: normal;
    overflow-wrap: anywhere;
}

.caddy-tooltip.hidden {
    display: none !important;
}