@import url("guestbook-preview.css");

.gb-page {
    width: min(1180px, calc(100% - 28px));
    margin: 0 auto;
    padding: 30px 0 60px;
}

.gb-flash {
    margin: 18px 0 0;
    padding: 13px 15px;
    border: 1px solid rgba(184, 147, 96, .84);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(255, 251, 240, .98), rgba(243, 229, 201, .98)),
        var(--paper);
    box-shadow: var(--shadow);
}

.gb-flash-success {
    color: #315f3d;
    border-color: rgba(90, 128, 83, .6);
}

.gb-flash-error {
    color: #8c332b;
    border-color: rgba(140, 51, 43, .58);
}

.gb-honey {
    position: absolute;
    left: -10000px;
}

.gb-form input[type="file"] {
    padding: 9px 10px;
    font-size: .92rem;
}

.gb-emoji-picker {
    margin: -4px 0 16px;
    padding: 10px 0 2px;
    border-top: 1px solid rgba(184, 147, 96, .35);
}

.gb-emoji-picker > span {
    display: block;
    margin-bottom: 7px;
    color: var(--muted);
    font-size: .88rem;
}

.gb-emoji-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.gb-emoji-buttons button {
    display: inline-grid;
    width: 34px;
    height: 34px;
    padding: 0;
    place-items: center;
    border: 1px solid rgba(154, 103, 43, .48);
    border-radius: 5px;
    background: rgba(255, 251, 240, .84);
    box-shadow: 0 2px 5px rgba(50, 24, 12, .08);
    cursor: pointer;
    font: 1.08rem/1 "Segoe UI Emoji", "Apple Color Emoji", sans-serif;
}

.gb-emoji-buttons button:hover,
.gb-emoji-buttons button:focus-visible {
    border-color: #7b2e23;
    background: #fffaf0;
    outline: 2px solid rgba(123, 46, 35, .18);
    outline-offset: 1px;
}

.gb-form {
    position: sticky !important;
    top: 18px !important;
    max-height: calc(100vh - 36px) !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

@media (max-width: 900px) {
    .gb-form {
        position: static !important;
        top: auto !important;
        max-height: none !important;
        overflow-y: visible !important;
    }
}

.gb-message {
    white-space: normal;
    overflow-wrap: anywhere;
}

.gb-message > :last-child {
    margin-bottom: 0;
}

.gb-message img,
.gb-reply img,
.gb-legacy-signature img {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}

.gb-legacy-smiley {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

.gb-legacy-signature {
    margin-top: 12px;
    line-height: 0;
}

.gb-legacy-signature img {
    display: block;
    width: min(420px, 100%);
}

.gb-reactions .gb-reaction-separator {
    align-self: center;
    width: 1px;
    min-width: 1px;
    height: 24px;
    margin: 0 4px;
    padding: 0;
    border-left: 1px solid rgba(154, 103, 43, .32);
}

.gb-reaction-menu {
    position: relative;
    display: inline-flex;
}

.gb-reaction-menu summary {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 7px 13px;
    color: #5a2a20;
    border: 1px solid rgba(154, 103, 43, .58);
    border-radius: 999px;
    background:
        linear-gradient(180deg, rgba(255, 250, 238, .94), rgba(231, 207, 166, .82)),
        linear-gradient(90deg, rgba(111, 45, 35, .08), transparent);
    box-shadow:
        inset 0 1px rgba(255, 255, 255, .72),
        0 2px 6px rgba(74, 36, 17, .14);
    cursor: pointer;
    font: 700 .94rem/1 Arial, sans-serif;
    list-style: none;
}

.gb-reaction-menu summary::-webkit-details-marker {
    display: none;
}

.gb-reaction-menu summary::after {
    content: "▾";
    margin-left: 8px;
    color: #7a5528;
    font-size: .72rem;
}

.gb-reaction-menu[open] summary::after {
    transform: rotate(180deg);
}

.gb-reaction-menu summary span {
    display: inline-block;
    min-width: 1.4em;
    margin-left: 6px;
    padding-left: 6px;
    color: #7a5528;
    border-left: 1px solid rgba(154, 103, 43, .3);
}

.gb-reaction-menu-panel {
    position: absolute;
    left: 0;
    bottom: calc(100% + 8px);
    z-index: 4;
    display: grid;
    grid-template-columns: repeat(2, max-content);
    gap: 8px;
    padding: 10px;
    border: 1px solid rgba(154, 103, 43, .42);
    border-radius: 12px;
    background:
        linear-gradient(180deg, rgba(255, 251, 240, .98), rgba(242, 224, 190, .98)),
        var(--paper);
    box-shadow: 0 12px 24px rgba(50, 24, 12, .22);
}

.gb-video-preview {
    display: flex;
    align-items: center;
    gap: 12px;
    width: min(420px, 100%);
    margin-top: 14px;
    padding: 10px;
    border: 1px solid rgba(184, 147, 96, .72);
    border-radius: 6px;
    background: #fff9ee;
    text-decoration: none;
}

.gb-video-thumb {
    width: 96px;
    aspect-ratio: 4 / 3;
    flex: 0 0 auto;
    border-radius: 4px;
    background: linear-gradient(135deg, #6d2e25, #c79b61);
    overflow: hidden;
    position: relative;
}

.gb-video-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gb-video-thumb::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(255, 255, 255, .92) 0 25%, transparent 26%);
}

.gb-video-thumb::after {
    content: "";
    position: absolute;
    left: 39px;
    top: 29px;
    border-left: 19px solid #7b2e23;
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
}

.gb-video-preview small {
    display: block;
    color: var(--muted);
}

.gb-admin-page,
.gb-admin-shell {
    width: min(980px, calc(100% - 28px));
    margin: 0 auto;
    padding: 30px 0 60px;
}

.gb-panel,
.gb-admin-panel {
    border: 1px solid rgba(184, 147, 96, .84);
    border-radius: 8px;
    box-shadow: var(--shadow);
    background:
        linear-gradient(180deg, rgba(255, 251, 240, .98), rgba(243, 229, 201, .98)),
        var(--paper);
    padding: 22px;
}

.gb-admin-list {
    display: grid;
    gap: 16px;
    margin-top: 18px;
}

.gb-admin-entry-person {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.gb-admin-avatar-preview {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border: 1px solid rgba(184, 147, 96, .84);
    border-radius: 6px;
    background: #fffdf8;
}

.gb-admin-media-preview {
    display: block;
    margin: 4px 0 8px;
}

.gb-admin-media-preview img {
    display: block;
    max-width: min(420px, 100%);
    height: auto;
}

.gb-owner-reply-signature {
    margin-top: 12px;
}

.gb-owner-reply-signature img {
    display: block;
    max-width: min(400px, 100%);
    height: auto;
}

.gb-admin-actions form {
    margin: 0;
}

.gb-email-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 14px;
    color: var(--ink);
    background: rgba(255, 250, 238, .72);
}

.gb-email-table th,
.gb-email-table td {
    padding: 9px 10px;
    border-bottom: 1px solid rgba(184, 147, 96, .35);
    text-align: left;
    vertical-align: top;
}

.gb-email-table th {
    color: #3a2418;
    font-weight: 700;
}

.gb-statistics-note {
    color: var(--muted);
}

.gb-stat-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 18px 0;
}

.gb-stat-cards > div {
    min-height: 92px;
    padding: 14px;
    border: 1px solid rgba(184, 147, 96, .55);
    border-radius: 6px;
    background: rgba(255, 250, 238, .72);
}

.gb-stat-cards strong,
.gb-stat-cards span {
    display: block;
}

.gb-stat-cards strong {
    margin-bottom: 5px;
    color: #6f2d23;
    font-size: 1.8rem;
}

.gb-last-activity {
    margin: 18px 0 28px;
}

.gb-visit-chart {
    display: grid;
    grid-template-columns: repeat(30, minmax(14px, 1fr));
    align-items: end;
    gap: 4px;
    height: 250px;
    margin: 16px 0 32px;
    padding: 24px 10px 34px;
    border: 1px solid rgba(184, 147, 96, .55);
    border-radius: 6px;
    background: rgba(255, 250, 238, .72);
}

.gb-visit-bar-wrap {
    display: flex;
    position: relative;
    height: 100%;
    min-width: 0;
    flex-direction: column;
    justify-content: flex-end;
    align-items: stretch;
}

.gb-visit-bar {
    display: block;
    min-height: 2px;
    border: 1px solid #6f2d23;
    border-radius: 3px 3px 0 0;
    background: linear-gradient(180deg, #a8543e, #6f2d23);
}

.gb-visit-value {
    margin-bottom: 3px;
    text-align: center;
    font: 700 .72rem Arial, sans-serif;
}

.gb-visit-bar-wrap time {
    position: absolute;
    top: calc(100% + 7px);
    left: 50%;
    transform: translateX(-50%) rotate(-55deg);
    transform-origin: top center;
    color: var(--muted);
    white-space: nowrap;
    font: .66rem Arial, sans-serif;
}

.gb-table-scroll {
    max-width: 100%;
    overflow-x: auto;
}

.gb-visit-table {
    min-width: 820px;
}

.gb-user-agent {
    max-width: 330px;
    overflow-wrap: anywhere;
}

.gb-page-stats {
    display: grid;
    gap: 13px;
    margin: 16px 0 32px;
    padding: 16px;
    border: 1px solid rgba(184, 147, 96, .55);
    border-radius: 6px;
    background: rgba(255, 250, 238, .72);
}

.gb-page-stat-head {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 6px;
}

.gb-page-stat-head span,
.gb-page-path {
    color: var(--muted);
}

.gb-page-stat-track {
    height: 9px;
    overflow: hidden;
    border-radius: 3px;
    background: rgba(184, 147, 96, .2);
}

.gb-page-stat-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #6f2d23, #a8543e);
}

.gb-page-path {
    display: block;
    margin-top: 3px;
    font-size: .78rem;
}

.gb-login {
    max-width: 440px;
    margin: 8vh auto 0;
}

.gb-notice,
.gb-error {
    margin: 14px 0;
    padding: 12px 14px;
    border-radius: 8px;
}

.gb-notice,
.gb-notice-success {
    color: #315f3d;
    border: 1px solid rgba(90, 128, 83, .6);
    background: rgba(250, 255, 244, .78);
}

.gb-error {
    color: #8c332b;
    border: 1px solid rgba(140, 51, 43, .58);
    background: rgba(255, 245, 240, .78);
}

.gb-admin-button {
    min-height: 38px;
    border: 1px solid #6f2d23;
    border-radius: 6px;
    padding: 10px 14px;
    color: #fffaf0;
    background: linear-gradient(180deg, #913c2e, #6f2d23);
    cursor: pointer;
    font: 700 .95rem Arial, sans-serif;
}

@media (max-width: 820px) {
    .gb-page,
    .gb-admin-page,
    .gb-admin-shell {
        width: min(100% - 20px, 680px);
        padding-top: 20px;
    }

    .gb-stat-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .gb-visit-chart {
        gap: 2px;
        padding-inline: 5px;
    }

    .gb-visit-value {
        font-size: .62rem;
    }
}

@media (max-width: 480px) {
    .gb-stat-cards {
        grid-template-columns: 1fr;
    }

    .gb-emoji-buttons {
        gap: 7px;
    }

    .gb-emoji-buttons button {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .gb-page-stat-head {
        display: block;
    }

    .gb-page-stat-head span {
        display: block;
        margin-top: 2px;
    }
}
