/* reference: https://developer.mozilla.org/en-US/docs/Web/API/File_API/Using_files_from_web_applications#using_a_label_element_to_trigger_a_hidden_file_input_element */
.visually-hidden {
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

input.visually-hidden:is(:focus, :focus-within) + label {
    outline: thin dotted;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
}

.text-encryption-link-wrap {
    position: fixed;
    top: 16px;
    left: 32px;
    padding: 6px;
    background-color: hsl(from var(--on-bg-color) h s l / 10%);
    border-radius: 6px;
}

.text-encryption-link {
    display: inline-block;
    color: var(--text-color);
}

.text-encryption-link:hover {
    filter: brightness(120%);
}

.main-grid {
    width: 100%;
    height: 95vh;
    padding: 12px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 6rem 4rem 3fr 1fr 4rem;
    gap: 1rem 2rem;
    justify-items: center;
}

.password-row {
    grid-column: 1 / span 2;
}

.unselectable {
    -webkit-user-select: none; /* Safari */
    user-select: none;
}

.preview-container {
    min-width: 500px;
    min-height: 300px;
    height: 100%;
    position: relative;
    background-color: hsl(150 50% 60% / 0.1);
}

.preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.image-preview {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.drag-and-drop-area {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 5px dashed grey;
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.drag-and-drop-hint {
    margin: 0px;
    font-size: 2rem;
}

.select-file-label {
    margin-top: 12px;
    padding: 4px;
    border: 1px solid;
    border-radius: 4px;
    cursor: pointer;
}

a.download-link {
    display: none;
}

.status-wrap {
    grid-column: 1 / span 2;
}
