@import url('https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,300i,400,400i,600,600i,700,700i&display=swap');

html {
    font-family: "Segoe UI", "San Francisco", "Source Sans Pro", sans-serif;
}

body {
    background: #1e1e1e;
    /* Explicitly mark the entire body as non-draggable.
       Without this, Electron 5 on Windows 11 can misreport the
       WM_NCHITTEST region, causing the OS to swallow all mouse
       clicks as window-drag attempts before they reach the DOM. */
    -webkit-app-region: no-drag;
}

/* The container injected by custom-electron-titlebar also needs
   no-drag so its scroll/overflow area doesn't accidentally become
   a caption region. */
.container-after-titlebar {
    -webkit-app-region: no-drag;
}

#tabContainer {
    position: absolute;
    background: #252525;
    top: 0;
    left: 25px;
    right: 25px;
    height: 35px;
    display: flex;
    flex-direction: row;
    visibility: hidden;
}

#leftSeek, #rightSeek {
    position: absolute;
    background: #252525;
    top: 0;
    width: 25px;
    height: 23px;
    text-align: center;
    font-size: 12px;
    vertical-align: middle;
    padding: 6px 0px;
    font-weight: bolder;
    visibility: hidden;
    user-select: none;
}

#leftSeek {
    left: 0;
}

#rightSeek {
    right: 0;
}

.active-seek {
    color: #cccccc;
    cursor: pointer;
}

.inactive-seek {
    color: #666666;
    cursor: default;
}

#viewContainer {
    position: absolute;
    width: 100%;
    top: 35px;
    left: 0;
    bottom: 0;
    right: 0;
    z-index: 1;
}

#backgroundInfo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translateX(-50%) translateY(-50%);
    margin: auto;
    display: block;
    font-size: 16px;
    font-weight: lighter;
    text-align: center;
    color: #cccccc;
    z-index: 2;
    pointer-events: auto;
}

.auth-entry {
    margin-top: 20px;
}

.auth-entry-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.auth-entry-actions .btn {
    margin-right: 12px;
}

.auth-entry-actions .btn:last-child {
    margin-right: 0;
}

.auth-entry-signed-in {
    margin-top: 10px;
    color: #cccccc;
    font-size: 14px;
}

.auth-entry-signed-in button {
    margin-top: 8px;
}

.btn {
    padding: 8px 14px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: background-color 0.2s;
}

.btn-primary {
    background-color: #4CAF50;
    color: #0f1f0f;
}

.btn-secondary {
    background-color: #555;
    color: #e0e0e0;
}

#backgroundLogo {
    position: relative;
    height: 150px;
    width: 150px;
    margin: auto;
}

iframe {
    position: absolute;
    border: none;
    width: 100%;
    height: 100%;
}

.active {
    background: #1e1e1e;
    border: none;
    color: #ffffff;
}

.inactive {
    background: #2d2d2d;
    border-left: 0.5px solid #252525;
    border-right: 0.5px solid #252525;
    color: #cccccc;
}

.file-tab-label {
    position: relative;
    display: inline-block;
    font-size: 12px;
    top: 50%;
    transform: translateY(-50%);
    overflow: hidden;
    text-overflow: ellipsis;
    width: calc(100% - 15px);
}

.file-tab-close {
    position: relative;
    display: inline-block;
    top: 40%;
    transform: translateY(-50%);
    margin-left: 5px;
    width: 10px;
    color: #ffffff;
}

.file-tab {
    float: left;
    height: 35px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-left: 10px;
    padding-right: 10px;
    cursor: pointer;
    user-select: none;
}

#highlightActionButton {
    position: fixed;
    display: none; /* shown via JS: style.display = 'flex' */
    z-index: 2147483647;
    width: 32px;
    height: 32px;
    background-color: #ffffff;
    border: 2px solid #ffffff;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    pointer-events: auto;
    user-select: none;
    opacity: 0;
    animation: fadeInButton 0.2s ease-out forwards;
    overflow: hidden;
    background-image: url("../assets/icons/png/256x256.png");
    background-size: 80%;
    background-position: center;
    background-repeat: no-repeat;
    color: transparent;
    font-size: 0;
}

#highlightActionButton:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

#highlightActionButton:active {
    transform: scale(0.95);
}

@keyframes fadeInButton {
    to {
        opacity: 1;
    }
}

/* Highlight modal (selection + edit) */
.highlight-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.highlight-modal-content {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: #252525;
    color: #e0e0e0;
    border: 1px solid #333;
    border-radius: 10px;
    width: 420px;
    max-width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.highlight-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #333;
}

.highlight-modal-close {
    background: none;
    border: none;
    color: #b0b0b0;
    font-size: 22px;
    cursor: pointer;
}

.highlight-modal-body {
    padding: 16px 20px 10px;
}

.highlight-modal-label {
    display: block;
    margin: 10px 0 6px;
    color: #b0b0b0;
    font-size: 13px;
}

.highlight-selected-text {
    background: #1e1e1e;
    border: 1px solid #333;
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 13px;
    color: #cfcfcf;
    margin-bottom: 8px;
    max-height: 90px;
    overflow-y: auto;
}

.highlight-tag-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 140px;
    overflow-y: auto;
    padding: 6px 0;
}

.highlight-tag-checkboxes label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.highlight-note-input {
    width: 100%;
    background: #1e1e1e;
    color: #e0e0e0;
    border: 1px solid #333;
    border-radius: 6px;
    padding: 8px 10px;
    font-family: inherit;
    font-size: 13px;
    resize: vertical;
}

.highlight-modal-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px 18px;
    gap: 12px;
}

.highlight-modal-actions-right {
    display: flex;
}

.highlight-modal-actions-right .highlight-btn + .highlight-btn {
    margin-left: 12px;
}

.highlight-btn {
    border: none;
    border-radius: 6px;
    padding: 8px 14px;
    font-size: 13px;
    cursor: pointer;
}

.highlight-btn-primary {
    background: #4CAF50;
    color: #0f1f0f;
    font-weight: 600;
}

.highlight-btn-secondary {
    background: #555;
    color: #e0e0e0;
}

.highlight-btn-danger {
    background: #d32f2f;
    color: #1e1e1e;
}