/* ===== Roman Numerals Theme ===== */

.rm-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    align-items: center;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(6px);
}

.rm-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--muted, #6b7280);
    letter-spacing: 0.02em;
    user-select: none;
}

.rm-switch {
    position: relative;
    width: 38px;
    height: 20px;
    padding: 0;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.rm-switch:focus-visible {
    outline: 2px solid rgba(217, 178, 116, 0.6);
    outline-offset: 2px;
}

.rm-switch-thumb {
    position: absolute;
    top: 1px;
    left: 1px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #94a3b8;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                background 0.25s ease,
                box-shadow 0.25s ease;
}

.rm-switch[aria-pressed="true"] {
    background: rgba(217, 178, 116, 0.18);
    border-color: rgba(217, 178, 116, 0.45);
    box-shadow: 0 0 12px rgba(217, 178, 116, 0.25);
}

.rm-switch[aria-pressed="true"] .rm-switch-thumb {
    transform: translateX(18px);
    background: #d9b274;
    box-shadow: 0 0 8px rgba(217, 178, 116, 0.7);
}

/* ===== Frame ===== */
.rm-stage {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 24px;
}

.rm-frame {
    position: relative;
    padding: 56px 80px;
    border-radius: 4px;
    background:
        radial-gradient(ellipse at top,
            rgba(217, 178, 116, 0.04) 0%,
            rgba(20, 16, 12, 0.95) 50%,
            rgba(15, 12, 9, 1) 100%);
    border: 1px solid rgba(217, 178, 116, 0.18);
    box-shadow:
        0 30px 60px -25px rgba(0, 0, 0, 0.85),
        inset 0 0 0 1px rgba(217, 178, 116, 0.08),
        inset 0 0 60px rgba(0, 0, 0, 0.5);
}

/* Decorative double-line border inside the frame */
.rm-frame::before,
.rm-frame::after {
    content: '';
    position: absolute;
    inset: 14px;
    border: 1px solid rgba(217, 178, 116, 0.18);
    pointer-events: none;
}

.rm-frame::after {
    inset: 18px;
    border-color: rgba(217, 178, 116, 0.08);
}

.rm-ornament {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-family: "Georgia", "Times New Roman", serif;
    font-size: 18px;
    color: rgba(217, 178, 116, 0.6);
    letter-spacing: 0.6em;
    padding: 0 8px;
    background:
        radial-gradient(ellipse at center,
            rgba(20, 16, 12, 1) 30%,
            rgba(20, 16, 12, 0.8) 60%,
            rgba(20, 16, 12, 0) 80%);
}

.rm-ornament-top {
    top: -10px;
}

.rm-ornament-bottom {
    bottom: -10px;
}

/* ===== Clock content ===== */
.rm-clock {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    color: #d9b274;
    text-shadow: 0 0 24px rgba(217, 178, 116, 0.18);
}

.rm-row {
    display: flex;
    align-items: baseline;
    justify-content: center;
}

.rm-row-time {
    font-family: "Trajan Pro", "Cinzel", "Georgia", "Times New Roman", serif;
    font-weight: 500;
    letter-spacing: 0.06em;
    gap: clamp(8px, 1.5vw, 22px);
    font-size: clamp(38px, 7.5vw, 88px);
    line-height: 1;
}

.rm-time {
    display: inline-block;
    min-width: 2.5ch;
    text-align: center;
}

.rm-sep {
    opacity: 0.4;
    font-size: 0.7em;
}

.rm-row-meridiem {
    font-family: "Trajan Pro", "Cinzel", "Georgia", "Times New Roman", serif;
    font-size: clamp(13px, 1.5vw, 17px);
    letter-spacing: 0.5em;
    color: rgba(217, 178, 116, 0.75);
    text-transform: uppercase;
    min-height: 1.4em;
}

.rm-meridiem:empty {
    visibility: hidden;
}

.rm-row-date {
    font-family: "Trajan Pro", "Cinzel", "Georgia", "Times New Roman", serif;
    font-size: clamp(13px, 1.5vw, 17px);
    letter-spacing: 0.4em;
    color: rgba(217, 178, 116, 0.55);
    text-transform: uppercase;
}

.rm-row-locale {
    font-family: "Trajan Pro", "Cinzel", "Georgia", "Times New Roman", serif;
    font-size: clamp(10px, 1vw, 12px);
    letter-spacing: 0.5em;
    color: rgba(217, 178, 116, 0.35);
    text-transform: uppercase;
    margin-top: 4px;
}

/* Hide seconds when toggled */
.rm-clock.no-seconds .rm-time-seconds,
.rm-clock.no-seconds .rm-sep-seconds {
    display: none;
}

@media (max-width: 640px) {
    .rm-frame { padding: 40px 28px; }
    .rm-ornament { font-size: 14px; letter-spacing: 0.4em; }
    .rm-toolbar { gap: 6px 12px; padding: 5px 10px; }
    .rm-toggle-label { font-size: 11px; }
}