/* Add Category Modal */
.tx-add-category-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* background-color: rgba(0, 0, 0, 0.5); */
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.tx-add-category-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.tx-add-category-modal {
    position: fixed;
    top: 313px;
    right: 332px;
    transform: translate(-50%, -50%);
    background-color: white;
    border-radius: 10px;
    width: 396px;
    z-index: 2001;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.tx-add-category-modal::before {
    content: "";
    position: absolute;
    top: 50%;
    right: -10px;
    transform: translateY(-50%) rotate(45deg);
    width: 30px;
    height: 30px;
    background-color: white;
    border-radius: 8px;

    z-index: -1;
}

.tx-add-category-modal.active {
    opacity: 1;
    visibility: visible;
}

.tx-add-category-modal.anchored {
    transform: none;
}

.tx-add-category-modal.anchored::before {
    display: block;
    left: -10px;
    right: auto;
    top: 102px;
    transform: translateY(-50%) rotate(45deg);
    /* box-shadow: -4px 4px 12px rgba(0, 0, 0, 0.08); */
}

.tx-add-category-modal-title {
    font-size: 16px;
    font-weight: 600;
    color: #141718;
    padding: 25px 25px 22px 25px;
    border-bottom: 1px solid #e8ecef;
    margin: 0;
}

.tx-add-category-form-group {
    padding: 25px 25px 22px 25px;
    border-bottom: 1px solid #e8ecef;
}

.tx-add-category-form-group label {
    display: block;
    color: #141718;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 15px;
}

.tx-add-category-input {
    width: 100%;
    padding: 15px 16px;
    background-color: #f3f5f7;
    border: 1px solid transparent;
    border-radius: 12px;
    font-size: 14px;
    color: #141718;
    font-weight: 400;
    transition: all 0.2s ease;
    outline: none;
    box-sizing: border-box;
}

.tx-add-category-input:focus {
    background-color: white;
    border: 1px solid #d0d0d0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.tx-add-category-input::placeholder {
    color: #999;
}

.tx-add-category-modal-buttons {
    display: flex;
    gap: 15px;
    justify-content: flex-start;
    padding: 24px 25px 25px;
    border-radius: 0 0 10px 10px;
}

.tx-add-category-modal-buttons {
    border-radius: 0 0 10px 10px;
}

.tx-btn-add-category {
    padding: 9px 50px;
}
.tx-btn-cancel-category {
    padding: 9px 43px;
}

.custom-select-options {
    max-height: 200px;
    overflow-y: scroll;
}

.patient-search-spin {
    position: absolute;
    right: 12px;
    top: 26% !important;
}
/* Sidebar Add Taxonomy Modal */
body.dark-theme .tx-add-category-modal {
    background-color: #1a1a1a;
}

body.dark-theme .tx-add-category-modal-title {
    color: #fefefe;
    border-bottom: 1px solid #2c2c2c;
}

body.dark-theme .add-category-form-group {
    border-bottom: 1px solid #2c2c2c;
}

body.dark-theme .tx-add-category-form-group label {
    color: #fefefe;
}

body.dark-theme .add-category-input {
    background-color: #2c2c2c;
    border: 1px solid #3a3a3a;
    color: #fefefe;
}

body.dark-theme .add-category-input::placeholder {
    color: #a0a0a0;
}

body.dark-theme .tx-add-category-modal-buttons {
    background-color: #1a1a1a !important;
}

body.dark-theme .add-category-icon-img:hover {
    background-color: #3a3a3a;
}

body.dark-theme .btn-add-category {
    background-color: #8a70f0;
    color: #fefefe;
}

body.dark-theme .btn-cancel-category {
    background-color: #2c2c2c;
    color: #fefefe;
    border: 1px solid #3a3a3a;
}

body.dark-theme .btn-cancel-category:hover {
    background-color: #3a3a3a;
}

/* Logo adjustments */
body.dark-theme .logo-cursor img {
    filter: brightness(0) invert(1);
}

/* Pencil Icon - White in Dark Mode */
body.dark-theme .pencil-icon {
    filter: brightness(0) invert(1);
}

body.dark-theme .category-dropdown .dropdown-item .pencil-icon,
body.dark-theme .slide-edit-btn .pencil-icon {
    filter: brightness(0) invert(1);
}

/* Ensure smooth transitions */
body.dark-theme * {
    transition: background-color 0.2s ease, border-color 0.2s ease,
        color 0.2s ease;
}

body.dark-theme .tx-add-category-modal::before {
    background-color: #1a1a1a;
}

/* Slide search spinner */
.slide-search-spinner {
    position: absolute;
    right: 12px;
    top: 25% !important;
    left: auto;
    color: #6c7275;
    font-size: 12px !important;
    pointer-events: none;
    z-index: 1;
    height: 20px;
    width: 20px;
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* add patient add btn spinner */
.add-patient-spinner {
    height: 25px;
    width: 25px;
    font-size: 12px !important;
}
/* patient list search spinner */
.patient-search-spin {
    position: absolute;
    right: 12px;
    top: 26% !important;
    left: auto;
    color: #6c7275;
    font-size: 12px !important;
    pointer-events: none;
    z-index: 1;
    height: 20px;
    width: 20px;
}

/**for toast messages**/
.toast-stack {
    position: fixed;
    bottom: 32px;
    left: 32px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    z-index: 2102;
    pointer-events: none;
}

.toast-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 18px;
    min-width: 360px;
    max-width: 420px;
    padding: 18px 24px;
    border-radius: 14px;
    border: 2px solid transparent;
    background: #ffffff;
    box-shadow: 0 22px 48px rgba(20, 23, 24, 0.16);
    opacity: 0;
    transform: translateY(16px) scale(0.98);
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: none;
}

.toast-card.show {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.toast-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
}

.toast-content {
    text-align: left;
}

.toast-title {
    margin: 0 0 2px;
    font-size: 18px;
    font-weight: 700;
}

.toast-message {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    color: #6c7275;
}

.toast-close {
    padding: 4px;
    border: none;
    background: transparent;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.toast-close:hover {
    opacity: 0.7;
}

.toast-success {
    border-color: #5eab82;
    background: #e5f1e5;
}

.toast-success .toast-icon {
    background: #28a745;
    color: #fefefe;
    box-shadow: 0 10px 24px rgba(40, 167, 69, 0.24);
    font-size: 18px;
}

.toast-success .toast-title {
    font-size: 16px;
    color: #34b53a;
}

.toast-success .toast-close {
    color: #1a1a1a;
    font-size: 14px;
    font-weight: 900;
}

.toast-error {
    border-color: #ff0200;
    background: #ffeeee;
}

.toast-error .toast-icon {
    background: #ff0200;
    color: #fefefe;
    font-size: 16px;
}

.toast-error .toast-title {
    color: #ff0200;
    font-size: 16px;
    font-weight: 700;
}

.toast-error .toast-close {
    color: #1a1a1a;
    font-size: 14px;
    font-weight: 900;
}

.toast-info {
    border-color: #3847cf;
    background: #ebedff;
}

.toast-info .toast-icon {
    background: #3847cf;
    color: #fefefe;
    font-size: 16px;
}

.toast-info .toast-title {
    color: #3847cf;
    font-size: 16px;
    font-weight: 700;
}

.toast-info .toast-close {
    color: #1a1a1a;
    font-size: 14px;
    font-weight: 900;
}

/* Custom spinner */
.spinner-custom {
    height: 20px;
    width: 20px;
    font-size: 12px;
}

/* Annotation tool */
.slide-wrapper {
    display: flex;
    flex-direction: row;
    gap: 15px;
    width: 100%;
}

/* viewer area takes remaining width */
.slide-canvas {
    flex: 1;
}

.slide-image-container {
    width: 100%;
    height: 100%;
}

#openseadragon.slide-main-image {
    width: 100%;
    height: 100vh;
    /* background: #111; */
}

.slide-tools-bar {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 15px 10px;
    background-color: #fefefe;
    height: 100%;
    overflow: visible;
    flex-shrink: 0;
}
.slide-tool-btn.active {
    background: rgba(108, 114, 117, 0.1) !important;
}
/* Annotation tool end */

/* Slide Tooltip dark theme */
body.dark-theme .slide-tooltip {
    background-color: #2c2c2c !important;
    color: #fefefe !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5) !important;
}

body.dark-theme .slide-tooltip::after {
    border-top-color: #2c2c2c !important;
}
/* Slide Tooltip dark theme end */

/*Dark theme Patient Info Container */
body.dark-theme .patient-info-container {
    background-color: #232627;
}

body.dark-theme .patient-name,
body.dark-theme .patient-demographics,
body.dark-theme .patient-id {
    color: #fefefe;
}

body.dark-theme .info-separator {
    background-color: #3a3a3a;
}

/* Notes Button */
body.dark-theme .notes-btn span {
    color: #fefefe;
}

/* body.dark-theme .notes-btn img {
  filter: brightness(0) invert(1);
} */

body.dark-theme .notes-btn .user-dropdown-arrow {
    color: #fefefe;
}

/* Notes Dropdown Menu */
body.dark-theme .notes-dropdown-menu {
    background-color: #2c2c2c;
    border: 1px solid #3a3a3a;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

body.dark-theme .notes-dropdown-item {
    color: #fefefe;
}

body.dark-theme .notes-dropdown-item:hover,
body.dark-theme .notes-dropdown-item.active {
    background-color: #8a70f0;
    color: #fefefe;
}

body.dark-theme .notes-item-title {
    color: #fefefe;
}

body.dark-theme .notes-item-subtitle {
    color: #a0a0a0;
}

body.dark-theme .notes-item-subtitle.active {
    color: #fefefe;
}
/*Dark theme Patient Info Container end*/

/* Delete Category Confirmation Modal */
.tx-delete-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(20, 23, 24, 0.55);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 2100;
}

.tx-delete-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.tx-delete-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    background: #ffffff;
    border-radius: 10px;
    width: 534px;
    max-width: calc(100% - 48px);
    box-shadow: 0 32px 72px rgba(20, 23, 24, 0.18);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, transform 0.35s ease, visibility 0.3s ease;
    z-index: 2101;
    overflow: hidden;
}

.tx-delete-modal.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.tx-delete-modal-header {
    background: linear-gradient(
        90deg,
        #a80100 0%,
        #c42929 55%,
        rgba(168, 1, 0, 0.5) 100%
    );
    padding: 29px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tx-delete-modal-title {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    color: #fefefe;
}

.tx-delete-modal-close {
    padding: 0;
    border: none;
    background: transparent;
    font-size: 16px;
    font-weight: 900;
    color: #ffffff;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
}

/* .delete-modal-close:hover {
  color: rgba(255, 255, 255, 0.75);
} */

.tx-delete-modal-content {
    padding-top: 44px;
    text-align: center;
}

.tx-delete-modal-icon {
    margin-bottom: 25px;
}

.tx-delete-modal-icon img {
    filter: brightness(0) saturate(100%) invert(10%) sepia(100%)
        saturate(10000%) hue-rotate(0deg) brightness(0.66) contrast(1.2);
}

.tx-delete-modal-message {
    font-size: 16px;
    font-weight: 500;
    line-height: 24px;
    color: #141718;
    margin: 0 0 43px;
}

.tx-delete-modal-actions {
    padding: 0 45px 35px;
    display: flex;
    align-items: center;
    gap: 22px;
}

.tx-delete-modal-btn {
    min-width: 160px;
    width: 100%;
    padding: 14px 24px;
    border-radius: 12px;
    border: none;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease,
        background-color 0.2s ease, color 0.2s ease;
}

.tx-delete-modal-confirm {
    background: #a80100;
    color: #fefefe;
}

.tx-delete-modal-cancel {
    background-color: #fefefe;
    color: #141718;
    border: 1.5px solid #a80100;
}

/* Annotation right sidebar */
.annotation-sidebar-wrapper {
    overflow-y: scroll;
}

.annotation-sidebar-wrapper::-webkit-scrollbar {
    width: 6px;
}

.annotation-sidebar-wrapper::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 3px;
}

.annotation-sidebar-wrapper::-webkit-scrollbar-thumb {
    background: #d0d5dd;
    border-radius: 3px;
}

.annotation-sidebar-wrapper::-webkit-scrollbar-thumb:hover {
    background: #98a2b3;
}

/* Annotation right sidebar  end */
/* Back button dark theme */
body.dark-theme .back-button span {
    color: #FEFEFE !important;
}
/* Back button dark theme end */
