/* Путь: baby_tracker/web/chat.css */

:root {
    --bg-primary: #FDF7F2;
    --bg-secondary: #F4EDE7;
    --bg-message-user: #C9A48E;
    --bg-message-bot: #EEE0D7;
    --bg-typing-dot: #B89080;
    --bg-button: #C4896F;
    --bg-button-disabled: #D9C5BB;

    --text-primary: #2E1A12;
    --text-secondary: #A07060;
    --text-white: #ffffff;

    --border-color: #E8D3C8;

    --radius-bubble: 18px;
    --radius-bubble-tail: 4px;
    --radius-button: 50%;
    --radius-container: 20px;

    --transition-fast: 0.2s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-primary);
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    max-width: 100%;
    background: var(--bg-primary);
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border-bottom: 0.5px solid var(--border-color);
}

.header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-button);
    background: #C4896F;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.header-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.bot-name {
    font-weight: 600;
    font-size: 15px;
    color: var(--text-primary);
}

.bot-status {
    font-size: 13px;
    color: var(--text-secondary);
}

.limits-badge {
    font-size: 15px;
    color: var(--text-secondary);
}

/* Messages */
.messages {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 12px 16px;
    background-color: var(--bg-primary);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3C!-- погремушка --%3E%3Cg transform='translate(28,28)' opacity='0.13' fill='none' stroke='%23B07A5A' stroke-width='1.8'%3E%3Ccircle cx='0' cy='-8' r='10'/%3E%3Cline x1='0' y1='2' x2='0' y2='18' stroke-linecap='round'/%3E%3Cellipse cx='0' cy='21' rx='5' ry='3' /%3E%3Ccircle cx='-4' cy='-10' r='1.5' fill='%23B07A5A' stroke='none'/%3E%3Ccircle cx='4' cy='-10' r='1.5' fill='%23B07A5A' stroke='none'/%3E%3C/g%3E%3C!-- градусник --%3E%3Cg transform='translate(120,18) rotate(25)' opacity='0.12' fill='none' stroke='%23B07A5A'%3E%3Crect x='-4' y='-22' width='8' height='30' rx='4' stroke-width='1.8'/%3E%3Ccircle cx='0' cy='14' r='6' stroke-width='1.8'/%3E%3Ccircle cx='0' cy='14' r='3' fill='%23B07A5A' stroke='none'/%3E%3Cline x1='-2' y1='-4' x2='2' y2='-4' stroke-width='1.3'/%3E%3Cline x1='-2' y1='0' x2='2' y2='0' stroke-width='1.3'/%3E%3Cline x1='-2' y1='4' x2='2' y2='4' stroke-width='1.3'/%3E%3Crect x='-1.5' y='-14' width='3' height='26' rx='1.5' fill='%23B07A5A' opacity='0.35' stroke='none'/%3E%3C/g%3E%3C!-- звёздочка --%3E%3Cg transform='translate(158,78)' opacity='0.13'%3E%3Cpolygon points='0,-12 3.5,-4.5 12,-3.5 5.5,2.5 7.5,11 0,6.5 -7.5,11 -5.5,2.5 -12,-3.5 -3.5,-4.5' fill='none' stroke='%23B07A5A' stroke-width='1.8' stroke-linejoin='round'/%3E%3C/g%3E%3C!-- бутылочка --%3E%3Cg transform='translate(48,108)' opacity='0.12' fill='none' stroke='%23B07A5A'%3E%3Crect x='-7' y='-2' width='14' height='26' rx='5' stroke-width='1.8'/%3E%3Crect x='-5' y='-9' width='10' height='8' rx='3' stroke-width='1.5'/%3E%3Crect x='-3.5' y='-14' width='7' height='5' rx='2.5' stroke-width='1.4'/%3E%3Cline x1='-3' y1='6' x2='3' y2='6' stroke-width='1.1'/%3E%3Cline x1='-3' y1='12' x2='3' y2='12' stroke-width='1.1'/%3E%3Cline x1='-3' y1='18' x2='3' y2='18' stroke-width='1.1'/%3E%3C/g%3E%3C!-- сердечко --%3E%3Cg transform='translate(135,130)' opacity='0.12'%3E%3Cpath d='M0,12 C-14,-1 -20,-12 -11,-18 C-5,-22 0,-16 0,-16 C0,-16 5,-22 11,-18 C20,-12 14,-1 0,12Z' fill='none' stroke='%23B07A5A' stroke-width='1.8' stroke-linejoin='round'/%3E%3C/g%3E%3C!-- луна --%3E%3Cg transform='translate(22,155)' opacity='0.11'%3E%3Cpath d='M10,-6 A13,13 0 1,1 -6,10 A9,9 0 1,0 10,-6Z' fill='none' stroke='%23B07A5A' stroke-width='1.8'/%3E%3C/g%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 180px 180px;
    overflow-anchor: none;
}

.history-loader {
    display: none;
    justify-content: center;
    padding: 6px 0 2px;
}
.history-loader.visible { display: flex; }

.history-loader-bar { display: none; }
@keyframes historyLoad {}

.message {
    margin-bottom: 12px;
    display: flex;
    animation: fadeIn var(--transition-fast);
}

@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(8px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

.user-message {
    justify-content: flex-end;
}

.bot-message {
    justify-content: flex-start;
}

.message-bubble {
    max-width: 70%;
    padding: 8px 12px;
    border-radius: var(--radius-bubble);
    word-wrap: break-word;
    white-space: pre-wrap;
    position: relative;
}

.user-message .message-bubble {
    background: var(--bg-message-user);
    color: var(--text-white);
    border-bottom-right-radius: var(--radius-bubble-tail);
}

.bot-message .message-bubble {
    background: var(--bg-message-bot);
    color: var(--text-primary);
    border-bottom-left-radius: var(--radius-bubble-tail);
}

.message-time {
    font-size: 11px;
    opacity: 0.6;
    margin-top: 4px;
    text-align: right;
}

/* Typing indicator */
.typing-indicator {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 6px 16px;
    background: var(--bg-primary);
}
.typing-indicator.visible {
    display: flex;
}

.typing-dots {
    display: flex;
    gap: 4px;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    background: var(--bg-typing-dot);
    border-radius: var(--radius-button);
    animation: bounce 1.4s infinite ease-in-out;
}

.typing-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.typing-text {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Image Preview */
.image-preview-container {
    display: none;
    padding: 8px 16px;
    background: var(--bg-primary);
    border-top: 0.5px solid var(--border-color);
    max-height: 120px;
    overflow-x: auto;
    overflow-y: hidden;
}

.image-preview-container.active {
    display: flex;
    gap: 8px;
}

.preview-item {
    position: relative;
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-secondary);
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-item .remove-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    color: white;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.preview-item .remove-btn:active {
    background: rgba(0, 0, 0, 0.8);
}

.preview-item .upload-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(200, 86, 58, 0.3);
}

.preview-item .upload-progress-bar {
    height: 100%;
    background: var(--bg-button);
    transition: width 0.3s;
}

.input-wrapper {
    background: var(--bg-primary);
    border-top: 0.5px solid var(--border-color);
    padding: 8px 16px calc(20px + env(safe-area-inset-bottom));
}

.input-container {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    background: var(--bg-secondary);
    border-radius: var(--radius-container);
    padding: 5px 5px 5px 5px;
}

.attach-button {
    width: 34px;
    height: 34px;
    border: none;
    border-radius: var(--radius-button);
    background: transparent;
    color: var(--bg-button);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: opacity var(--transition-fast);
    flex-shrink: 0;
}

.attach-button:active:not(:disabled) {
    opacity: 0.5;
}

.attach-button:disabled {
    color: var(--bg-button-disabled);
    cursor: not-allowed;
}

#messageInput {
    flex: 1;
    min-height: 34px;
    max-height: 120px;
    padding: 8px 8px;
    border: none;
    background: transparent;
    font-size: 16px;
    font-family: inherit;
    resize: none;
    outline: none;
    color: var(--text-primary);
    overflow-y: auto;
}

#messageInput::-webkit-scrollbar {
    display: none;
}

#messageInput::placeholder {
    color: var(--text-secondary);
}

#messageInput:disabled {
    color: var(--bg-button-disabled);
}

.send-button {
    width: 34px;
    height: 34px;
    border: none;
    border-radius: var(--radius-button);
    background: var(--bg-button);
    color: var(--text-white);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: opacity var(--transition-fast);
    flex-shrink: 0;
}

.send-button:active:not(:disabled) {
    opacity: 0.7;
}

.send-button:disabled {
    background: var(--bg-button-disabled);
    cursor: not-allowed;
}

/* Scrollbar */
.messages::-webkit-scrollbar {
    width: 4px;
}

.messages::-webkit-scrollbar-track {
    background: transparent;
}

.messages::-webkit-scrollbar-thumb {
    background: var(--bg-button-disabled);
    border-radius: 2px;
}

.messages::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

.image-preview-container::-webkit-scrollbar {
    height: 4px;
}

.image-preview-container::-webkit-scrollbar-track {
    background: transparent;
}

.image-preview-container::-webkit-scrollbar-thumb {
    background: var(--bg-button-disabled);
    border-radius: 2px;
}
.message-bubble h2 {
    font-size: 1.1em;
    font-weight: 600;
    margin: 10px 0 5px 0;
}

.message-bubble h3 {
    font-size: 1em;
    font-weight: 600;
    margin: 8px 0 4px 0;
}

.message-bubble h4 {
    font-size: 0.95em;
    font-weight: 600;
    margin: 6px 0 3px 0;
}

.message-bubble strong {
    font-weight: 600;
    color: #2E1A12;
}

/* Превьюшки изображений в сообщениях */
.message-images {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.message-image-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
}

.user-message .message-image-thumb {
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.bot-message .message-image-thumb {
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.message-text {
    line-height: 1.4;
}

.preview-item.uploading img {
    opacity: 0.5;
    filter: grayscale(30%);
    transition: opacity 0.3s ease, filter 0.3s ease;
}

.preview-item.uploading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.25);
    pointer-events: none;
}

/* Modal для увеличения фото */
.image-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(4px);
}

.modal-content {
    display: block;
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    animation: zoomIn 0.25s ease;
}

@keyframes zoomIn {
    from { transform: scale(0.85); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
}

.modal-close:hover {
    color: #bbb;
}

.message-image-thumb {
    cursor: pointer;
    transition: opacity 0.2s;
}

.message-image-thumb:hover {
    opacity: 0.8;
}

/* Стрелки навигации */
.modal-prev,
.modal-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    font-size: 30px;
    padding: 16px 20px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.3s;
    z-index: 10001;
}

.modal-prev:hover,
.modal-next:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.modal-prev {
    left: 20px;
}

.modal-next {
    right: 20px;
}

.modal-prev.hidden,
.modal-next.hidden {
    display: none;
}

/* Счетчик фото */
.modal-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    z-index: 10001;
}

.modal-counter.hidden {
    display: none;
}

/* Кнопка "Прокрутить вниз" */
.scroll-down-button {
    position: fixed;
    right: 16px;
    bottom: 130px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-button);
    color: var(--text-white);
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.8);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}

.scroll-down-button.visible {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.scroll-down-button:active {
    transform: scale(0.9);
}

.scroll-down-button svg {
    flex-shrink: 0;
}

.quick-actions {
    padding: 6px 12px 6px;
    background: transparent;
}

.generate-main-btn {
    width: 100%;
    background: linear-gradient(135deg, #C4896F, #DDA088);
    border: none;
    border-radius: 12px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    transition: opacity 0.15s, transform 0.1s;
    font-family: inherit;
    letter-spacing: 0.2px;
}
.generate-main-btn:hover { opacity: 0.92; }
.generate-main-btn:active { transform: scale(0.98); }

.generate-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 1500;
    animation: fadeOverlay 0.2s ease;
}
.generate-overlay.open { display: block; }
@keyframes fadeOverlay { from { opacity: 0; } to { opacity: 1; } }

.generate-sheet {
    position: fixed;
    bottom: -100%;
    left: 0; right: 0;
    background: #FDF7F2;
    border-radius: 20px 20px 0 0;
    padding: 12px 16px 32px;
    z-index: 1600;
    transition: bottom 0.3s cubic-bezier(0.32, 0.72, 0, 1);
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.generate-sheet.open { bottom: 0; }

.generate-sheet-handle {
    display: none;
}
.generate-sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.generate-sheet-title {
    font-size: 13px;
    color: #A07060;
    margin: 0;
    font-weight: 500;
}
.generate-sheet-close {
    background: #F4EDE7;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    font-size: 13px;
    color: #A07060;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
    transition: background 0.12s;
}
.generate-sheet-close:hover { background: #EADDD6; }

.submenu-btn {
    background: #F4EDE7;
    border: none;
    border-radius: 12px;
    padding: 13px 16px;
    font-size: 15px;
    color: #2E1A12;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    font-weight: 500;
    transition: background 0.12s;
    -webkit-tap-highlight-color: transparent;
    outline: none;
    -webkit-user-select: none;
    user-select: none;
}
.submenu-btn:hover { background: #EADDD6; color: #C4896F; }
.submenu-btn:active { background: #E0CFC7; }
.submenu-btn:focus, .submenu-btn:focus-visible { outline: none; background: #F4EDE7; color: #2E1A12; }

.calendar-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
.calendar-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
}
.calendar-modal-sheet {
    position: relative;
    background: #FDF7F2;
    border-radius: 20px 20px 0 0;
    padding: 20px 20px 36px;
    width: 100%;
    max-height: 88vh;
    overflow-y: auto;
}
.calendar-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}
.calendar-modal-title {
    font-size: 16px;
    font-weight: 700;
    color: #2E1A12;
}
.calendar-modal-close {
    background: #F4EDE7;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    font-size: 13px;
    cursor: pointer;
    color: #A07060;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.calendar-modal-desc {
    font-size: 13px;
    color: #A07060;
    line-height: 1.4;
}
.calendar-photos {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}
.calendar-photo-item { aspect-ratio: 1; }
.calendar-photo-preview {
    width: 100%;
    height: 100%;
    min-height: 90px;
    border-radius: 14px;
    border: 2px dashed #E8D3C8;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    background: #FAF3EE;
    position: relative;
    overflow: hidden;
    transition: border-color 0.15s;
}
.calendar-photo-preview:hover { border-color: #C4896F; }
.calendar-photo-icon { font-size: 30px; line-height: 1; }
.calendar-photo-label { font-size: 12px; color: #A07060; font-weight: 500; }
.calendar-check {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #C4896F;
    color: #fff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
}
.cal-slots-row {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 4px 2px 12px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.cal-slots-row::-webkit-scrollbar { display: none; }
.cal-slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.cal-slot-preview {
    width: 80px;
    height: 80px;
    border-radius: 14px;
    border: 2px dashed #E8D3C8;
    background: #FAF3EE;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    transition: border-color 0.15s;
}
.cal-slot-preview:hover { border-color: #C4896F; }
.cal-slot-preview .calendar-photo-icon { font-size: 28px; line-height: 1; }
.cal-slot-add {
    width: 80px;
    height: 80px;
    border-radius: 14px;
    border: 2px dashed #C4896F;
    background: #FAF3EE;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 28px;
    color: #C4896F;
    transition: background 0.15s;
}
.cal-slot-add:hover { background: #F4EDE7; }

.cal-slot-label {
    font-size: 12px;
    color: #A07060;
    font-weight: 500;
    text-align: center;
}
.calendar-generate-btn {
    display: block;
    width: 100%;
    background: linear-gradient(135deg, #C4896F, #DDA088);
    border: none;
    border-radius: 12px;
    padding: 14px 16px;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    transition: opacity 0.15s, transform 0.1s;
    font-family: inherit;
    letter-spacing: 0.2px;
    margin-bottom: 8px;
    text-align: center;
}
.calendar-generate-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.calendar-generate-btn:not(:disabled):active { opacity: 0.8; }
.calendar-promo-note {
    text-align: center;
    font-size: 12px;
    color: #C8A898;
    margin: 0;
}

.style-picker {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 2px 12px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin-bottom: 4px;
}
.style-picker::-webkit-scrollbar { display: none; }
.style-chip {
    flex-shrink: 0;
    padding: 7px 14px;
    border-radius: 20px;
    border: 1.5px solid #E8D3C8;
    background: #FAF3EE;
    font-size: 13px;
    font-weight: 500;
    color: #2E1A12;
    cursor: pointer;
    white-space: nowrap;
    font-family: inherit;
    transition: background 0.12s, border-color 0.12s, color 0.12s;
    -webkit-tap-highlight-color: transparent;
}
.style-chip.active {
    background: #C4896F;
    border-color: #C4896F;
    color: #fff;
}
.style-picker-label {
    font-size: 12px;
    color: #A07060;
    font-weight: 500;
    margin-bottom: 6px;
}
.download-btn {
    display: inline-block;
    background: #C4896F;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    width: 100%;
    margin-top: 8px;
    text-align: center;
}
.download-btn:active { opacity: 0.8; }

#modalZoomWrap {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    touch-action: none;
}
.image-modal .modal-content {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    position: static;
    top: auto;
    left: auto;
    transform: none;
    margin: 0;
    border-radius: 8px;
    will-change: transform;
    cursor: grab;
    user-select: none;
    -webkit-user-drag: none;
}
.image-modal .modal-content:active { cursor: grabbing; }