﻿@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');

html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

a, .btn-link {
    color: #0366d6;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

app {
    position: relative;
    display: flex;
    flex-direction: column;
}

.top-row {
    height: 3.5rem;
    display: flex;
    align-items: center;
}

.main {
    flex: 1;
}

.main .top-row {
    background-color: #f7f7f7;
    border-bottom: 1px solid #d6d5d5;
    justify-content: flex-end;
}

.main .top-row > a {
    margin-left: 1.5rem;
}

.sidebar {
    background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%);
}

.sidebar .top-row {
    background-color: rgba(0,0,0,0.4);
}

.sidebar .navbar-brand {
    font-size: 1.1rem;
}

.sidebar .oi {
    width: 2rem;
    font-size: 1.1rem;
    vertical-align: text-top;
    top: -2px;
}

.nav-item {
    font-size: 0.9rem;
    padding-bottom: 0.5rem;
}

.nav-item:first-of-type {
    padding-top: 1rem;
}

.nav-item:last-of-type {
    padding-bottom: 1rem;
}

.nav-item a {
    color: #d7d7d7;
    border-radius: 4px;
    height: 3rem;
    display: flex;
    align-items: center;
    line-height: 3rem;
}

.nav-item a.active {
    background-color: transparent;
    color: white;
}

.nav-item a:hover {
    background-color: rgba(255,255,255,0.1);
    color: white;
}

.content {
    padding-top: 1.1rem;
}

.navbar-toggler {
    background-color: rgba(255, 255, 255, 0.1);
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}
.planner-header .sb-table-cell {
    padding-right: 6px;
    vertical-align: middle;
}
.planner-header .sb-github-btn {
    width: 40px;
    opacity: 100;
    padding: 11px 8px;
    border-radius: 0px;
    border-width: 0px;
    font-family: "Roboto", "Segoe UI", "GeezaPro", "DejaVu Serif", "sans-serif";
    font-weight: 500;
    line-height: 18px;
    border-color: transparent;
    background: transparent;
}

.planner-header .github-image img {
    filter: brightness(0) invert(100%);
}

@media (max-width: 767.98px) {
    .main .top-row {
        display: none;
    }
}

@media (min-width: 768px) {
    app {
        flex-direction: row;
    }

    .sidebar {
        width: 250px;
        height: 100vh;
        position: sticky;
        top: 0;
    }

    .main .top-row {
        position: sticky;
        top: 0;
    }

    .main > div {
        padding-left: 2rem !important;
        padding-right: 1.5rem !important;
    }

    .navbar-toggler {
        display: none;
    }

    .sidebar .collapse {
        /* Never collapse the sidebar for wide screens */
        display: block;
    }
}
.nav-item.e-list-item {
    height: 50px;
    line-height: 50px;
    padding: 0px;
    border-radius: 3px;
    border-bottom: 0px;
    align-items: center;
    color: #666;
    cursor: pointer;
}
.nav-item.e-list-item:hover {
    background-color: #f5f5f5;
    border-color: transparent;
    color: rgba(51,51,51,.87);
}
ul.nav.flex-column {
    margin: 0 16px;
    width: 210px;
}

.sideparent.menulist {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif, "-apple-system", BlinkMacSystemFont;
    font-size: 12px;
    font-weight: 400;
}

/* ==================== PROGRESS NOTES CANVAS - DRAGGABLE IMAGE OVERLAY ==================== */

/* Floating text input for the Text tool */
.draw-text-input {
    position: absolute;
    min-width: 120px;
    max-width: 70%;
    padding: 6px 8px;
    border: 1px solid rgba(0,0,0,0.3);
    border-radius: 4px;
    background: rgba(255,255,255,0.95);
    color: #0f172a;
    font: 16px/1.4 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    z-index: 5;
    resize: both;
    overflow: auto;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    cursor: move;
    pointer-events: auto;
}

.draw-text-input::after {
    content: '';
    position: absolute;
    right: 4px;
    bottom: 4px;
    width: 12px;
    height: 12px;
    border-right: 2px solid rgba(0,0,0,0.3);
    border-bottom: 2px solid rgba(0,0,0,0.3);
    pointer-events: none;
}

/* Draggable/resizable imported image overlay */
.draw-image-overlay {
    position: absolute;
    min-width: 40px;
    min-height: 40px;
    border: 2px solid #3b82f6;
    background: rgba(59, 130, 246, 0.05);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
    cursor: move;
    z-index: 100;
    user-select: none;
    touch-action: none;
    transition: box-shadow 0.2s;
    pointer-events: auto;
}

.draw-image-overlay:hover {
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
    border-color: #2563eb;
}

.draw-image-overlay img {
    display: block;
    width: 100%;
    height: 100%;
    user-select: none;
    pointer-events: none; /* allow dragging via container */
    object-fit: contain;
}

.draw-image-overlay .img-handle {
    position: absolute;
    width: 14px; 
    height: 14px;
    background: #3b82f6;
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    z-index: 10;
    touch-action: none;
    pointer-events: auto;
    cursor: pointer;
}

.draw-image-overlay .img-handle:hover {
    background: #2563eb;
    transform: scale(1.2);
}

.draw-image-overlay .img-handle.nw { 
    left: -7px; 
    top: -7px; 
    cursor: nwse-resize; 
}

.draw-image-overlay .img-handle.ne { 
    right: -7px; 
    top: -7px; 
    cursor: nesw-resize; 
}

.draw-image-overlay .img-handle.sw { 
    left: -7px; 
    bottom: -7px; 
    cursor: nesw-resize; 
}

.draw-image-overlay .img-handle.se { 
    right: -7px; 
    bottom: -7px; 
    cursor: nwse-resize; 
}

.draw-image-overlay .img-controls {
    position: absolute;
    top: -36px; 
    right: 0;
    display: flex; 
    gap: 8px;
    z-index: 10;
    pointer-events: auto;
}

.draw-image-overlay .img-controls button {
    width: 28px; 
    height: 28px;
    border-radius: 6px;
    border: none;
    background: #3b82f6;
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.4);
    transition: all 0.2s;
    pointer-events: auto;
}

.draw-image-overlay .img-controls button:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.5);
}

.draw-image-overlay .img-controls button.img-delete {
    background: #ef4444;
}

.draw-image-overlay .img-controls button.img-delete:hover {
    background: #dc2626;
}

/* ==================== END CANVAS IMAGE OVERLAY STYLES ==================== */

/* ==================== PROGRESS NOTES CANVAS - BALLOON NOTES ==================== */

/* Balloon note pin and popup */
.balloon-pin {
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #2563eb;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
    transform: translate(-50%, -100%);
    cursor: pointer;
    z-index: 7;
    pointer-events: auto;
}

.balloon-pin::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -6px;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 8px solid #2563eb;
}

.balloon-popup {
    position: absolute;
    max-width: 260px;
    background: #ffffff;
    color: #0f172a;
    border: 1px solid rgba(0,0,0,0.15);
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
    padding: 10px 12px;
    z-index: 8;
    pointer-events: auto;
}

.balloon-popup::before {
    content: '';
    position: absolute;
    left: 16px;
    bottom: -8px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 10px solid #ffffff;
    filter: drop-shadow(0 -1px 0 rgba(0,0,0,0.1));
}

.balloon-popup .balloon-actions {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    justify-content: flex-end;
}

.balloon-popup button {
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid rgba(0,0,0,0.2);
    background: #f8fafc;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.balloon-popup button:hover {
    background: #e2e8f0;
}

.balloon-popup button.balloon-save {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.balloon-popup button.balloon-save:hover {
    background: #2563eb;
}

.balloon-popup button.balloon-delete {
    background: #ef4444;
    color: white;
    border-color: #ef4444;
}

.balloon-popup button.balloon-delete:hover {
    background: #dc2626;
}

/* ==================== END CANVAS BALLOON NOTES STYLES ==================== */

