/* ==========================================================================
   GUESTBOOK MODULE (guestbook.css)
   Scoped to .guestbook-module to stay modular alongside main stylesheet
   ========================================================================== */

iframe[title="Guestbook"] {
    display: block !important;
    width: 100% !important;
    height: 800px !important;
    border: 0 !important;
}

.guestbook-module,
.guestbook-module *,
.guestbook-module *::before,
.guestbook-module *::after {
    box-sizing: border-box;
}

.guestbook-module {
    display: block;
    flex: 1 1 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0;
}

.guestbook-module code {
    font-size: 0.85rem;
}

/* --- ASCII Section Divider --- */
.guestbook-module .ascii-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    margin: 0.75rem 0 0.45rem;
    font-size: 0.8rem;
    letter-spacing: 0.14em;
    color: rgba(20, 200, 180, 0.85);
    text-shadow: 0 0 8px rgba(20, 200, 180, 0.35);
    user-select: none;
    overflow: hidden;
}

.guestbook-module .ascii-divider::before {
    content: none;
}

.guestbook-module .ascii-divider::after {
    content: attr(data-ascii);
    flex: 0 1 auto;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- Guestbook Container --- */
.guestbook-module .gb-frame-card {
    --accent-rgb: 20, 200, 180;
    --accent-hex: #2de2e6;

    position: relative;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto !important;
    align-self: stretch;
    gap: 0.65rem;
    width: 100% !important;
    min-width: 0;
    max-width: min(100%, 1200px) !important;
    margin-inline: auto;
    padding: 1rem 1.15rem;
    border-radius: 4px;
    border: 1px solid rgba(var(--accent-rgb), 0.45);
    background:
        linear-gradient(
            180deg,
            rgba(var(--accent-rgb), 0.07) 0%,
            rgba(0, 0, 0, 0.35) 100%
        );
    box-shadow:
        0 0 14px rgba(var(--accent-rgb), 0.1),
        inset 0 0 12px rgba(var(--accent-rgb), 0.04);
}

/* Corner bracket accents */
.guestbook-module .gb-frame-card::before,
.guestbook-module .gb-frame-card::after {
    content: "";
    position: absolute;
    width: 8px;
    height: 8px;
    border-color: rgba(var(--accent-rgb), 0.85);
    border-style: solid;
    pointer-events: none;
}

.guestbook-module .gb-frame-card::before {
    top: -1px;
    left: -1px;
    border-width: 2px 0 0 2px;
}

.guestbook-module .gb-frame-card::after {
    bottom: -1px;
    right: -1px;
    border-width: 0 2px 2px 0;
}

.guestbook-module .gb-frame-card--pink {
    --accent-rgb: 255, 100, 200;
    --accent-hex: #ff64c8;
}

.guestbook-module .gb-frame-card--purple {
    --accent-rgb: 213, 128, 255;
    --accent-hex: #d580ff;
}

/* --- Header Bar --- */
.guestbook-module .gb-frame-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    min-width: 0;
    padding-bottom: 0.4rem;
    border-bottom: 1px dashed rgba(var(--accent-rgb), 0.45);
}

.guestbook-module .gb-frame-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent-hex);
    text-shadow: 0 0 8px rgba(var(--accent-rgb), 0.4);
}

.guestbook-module .gb-status {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    padding: 0.14rem 0.42rem;
    border-radius: 2px;
    white-space: nowrap;
    color: var(--accent-hex);
    border: 1px solid rgba(var(--accent-rgb), 0.55);
    background: rgba(var(--accent-rgb), 0.1);
}

/* --- Responsive Iframe Wrapper --- */
.guestbook-module .gb-embed-wrap {
    display: block !important;
    flex: 1 1 auto !important;
    align-self: stretch;
    width: 100% !important;
    min-width: 0;
    max-width: 100% !important;
    min-height: 760px !important;
    border-radius: 3px;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid rgba(var(--accent-rgb), 0.35);
    background: rgba(0, 0, 0, 0.45);
}

.guestbook-module .gb-embed-wrap > iframe,
.guestbook-module .gb-iframe,
.guestbook-module iframe.gb-iframe {
    display: block !important;
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    height: clamp(760px, 88vh, 1200px) !important;
    min-height: 760px !important;
    border: 0 !important;
}

/* --- Fallback Direct Link --- */
.guestbook-module .gb-fallback {
    margin: 0;
    font-size: 0.8rem;
    color: rgba(224, 224, 224, 0.68);
}

.guestbook-module .gb-direct-link {
    color: var(--accent-hex);
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 2px;
}

.guestbook-module .gb-direct-link:hover,
.guestbook-module .gb-direct-link:focus-visible {
    color: #ffffff;
    text-decoration-style: solid;
    outline: none;
}

@media (max-width: 600px) {
    .guestbook-module .gb-frame-card {
        padding: 0.8rem;
    }

    .guestbook-module .gb-embed-wrap {
        min-height: 640px !important;
    }

    .guestbook-module .gb-embed-wrap > iframe,
    .guestbook-module .gb-iframe,
    .guestbook-module iframe.gb-iframe {
        height: 640px !important;
        min-height: 640px !important;
    }
}

@media (max-width: 480px) {
    .guestbook-module .ascii-divider {
        font-size: 0.62rem;
        letter-spacing: 0.08em;
    }
}