﻿#presetPreview {
    width: 200px;
    height: 200px;
}

.printDialogOverlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 1000;
}


    .printDialogOverlay.visible {
        opacity: 1;
        pointer-events: auto;
    }


.printDialog {
    width: 900px;
    height: 600px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    overflow: hidden;
}


.printDialogTitleBar {
    height: 40px;
    background: #444;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    font-size: 18px;
    font-weight: bold;
}


.printDialogClose {
    border: none;
    background: transparent;
    color: white;
    font-size: 24px;
    cursor: pointer;
}


.printDialogContent {
    display: flex;
    gap: 20px;
    padding: 20px;
    height: 500px;
    box-sizing: border-box;
}

.printDialogSettings {
    width: 180px;
    flex-shrink: 0;
}

.printSetting {
    display: flex;
    flex-direction: column;
    gap: 6px;
}


    .printSetting > label {
        font-size: 14px;
        font-weight: 600;
        color: #444;
    }


    .printSetting select {
        width: 100%;
        box-sizing: border-box;
        padding: 7px 8px;
        border: 1px solid #ccc;
        border-radius: 5px;
        background: white;
        font-size: 14px;
    }


.printSettingGroup {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #ddd;
}


.printCheckbox {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    font-size: 14px;
    color: #444;
    cursor: pointer;
}


    .printCheckbox:last-child {
        margin-bottom: 0;
    }


    .printCheckbox input {
        width: 16px;
        height: 16px;
        margin: 0;
        cursor: pointer;
    }


.printPresetPanel {
    flex: 1;
    min-width: 0;
    overflow-y: auto;
    padding-right: 5px;
    background-color: blanchedalmond;
}


.printPresetGrid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
}

.printPreset {
    aspect-ratio: 1 / 1;
    box-sizing: border-box;
    border: 0px solid #ccc;
    border-radius: 0;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

    .printPreset:hover .printPresetPage {
        outline-color: #777;
    }


    .printPreset.selected .printPresetPage {
        background: #3934;
        outline: 3px solid #393;
    }

.printPresetTooltip {
    position: absolute;
    left: 50%;
    bottom: 10px;
    transform: translateX(-50%);
    padding: 6px 10px;
    background: rgba(40, 40, 40, 0.92);
    color: white;
    border-radius: 4px;
    font-size: 12px;
    line-height: 1.4;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

    .printPresetTooltip.visible {
        opacity: 1;
    }

.printPresetPage {
    width: 100%;
    height: 100%;
    outline: 3px solid transparent;
}


.printPresetPaper {
    fill: white;
    stroke: #999;
    stroke-width: 0.5;
}

.printPresetRules {
    fill: #e0e0e0;
}

.printPresetPuzzleBorder {
    fill: white;
    stroke: #222;
    stroke-width: 0.7;
}

.printPresetPuzzleGrid {
    stroke: #777;
    stroke-width: 0.3;
}

.printPresetScratchpadArea {
    fill: white;
    stroke: #888;
    stroke-width: 0.5;
}

.printPresetScratchpadLine {
    stroke: #666;
    stroke-width: 0.3;
}

.printDialogButtonBar {
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 0 20px;
    border-top: 1px solid #ddd;
    background: #f5f5f5;
}


    .printDialogButtonBar button {
        min-width: 90px;
        padding: 8px 16px;
        border: 1px solid #bbb;
        border-radius: 4px;
        font-size: 14px;
        cursor: pointer;
    }


.printDialogCancel {
    background: white;
}


.printDialogPrint {
    background: #444;
    color: white;
}


    .printDialogPrint:disabled {
        opacity: 0.4;
        cursor: default;
    }