/* ==========================================================================
   ARIMA - DISCORD TIMESTAMPS GENERATOR STYLESHEET
   Clean pure-white card & table with cream-toned inputs matching Hammertime layout
   ========================================================================== */

/* Page Body & Wrapper: Full-height flex column with adaptive space */
body.timestamps-page-body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
}

.timestamps-page-wrapper {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 85px 0 20px;
    box-sizing: border-box;
}

.timestamps-page-container {
    max-width: 980px;
    width: 100%;
    margin: 0 auto;
    padding: 0 16px;
}

/* ==========================================================================
   Pure White Card Container (.mantine-Paper-root)
   No double colors: Clean white background throughout
   ========================================================================== */

.mantine-Paper-root {
    background: #ffffff;
    border: 1px solid var(--border-subtle, rgba(97, 74, 68, 0.12));
    border-radius: var(--radius-card, 20px);
    box-shadow: var(--shadow-md, 0 8px 30px rgba(97, 74, 68, 0.07));
    padding: 14px 20px;
    position: relative;
    overflow: visible;
}

/* Top Controls Row: Perfectly aligned baseline */
.TimestampPicker-module-scss-module__5dmVeq__timestamp-picker {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    margin-bottom: 8px;
    flex-wrap: wrap;
    position: relative;
    width: 100%;
}

@media (min-width: 768px) {
    .TimestampPicker-module-scss-module__5dmVeq__timestamp-picker {
        flex-wrap: nowrap;
    }
}

.TimestampPicker-module-scss-module__5dmVeq__datetime-picker-wrap {
    flex: 1.35;
    min-width: 260px;
    position: relative;
}

.mantine-InputWrapper-root {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.mantine-InputWrapper-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted, #757170);
    font-family: var(--font-body);
    line-height: 1.2;
    margin-bottom: 6px;
    display: block;
}

.mantine-Input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    height: 38px;
}

.mantine-Input-icon {
    position: absolute;
    left: 14px;
    pointer-events: none;
    color: var(--text-muted, #757170);
    display: inline-flex;
    align-items: center;
    font-size: 14px;
    z-index: 2;
}

.mantine-Input-icon svg {
    width: 15px;
    height: 15px;
    fill: currentColor;
}

/* Input boxes: Cream color of the page with subtle border */
.mantine-Input-input {
    width: 100%;
    height: 38px;
    background: var(--bg-card-warm, #f4efe9);
    border: 1px solid var(--border-subtle, rgba(97, 74, 68, 0.15));
    border-radius: 6px;
    color: var(--text-primary, #1a1615);
    font-size: 14px;
    font-family: var(--font-body);
    font-weight: 500;
    padding: 0 14px 0 38px;
    outline: none;
    transition: var(--transition-snappy);
    text-align: left;
    cursor: pointer;
    box-sizing: border-box;
}

.mantine-Input-input:hover {
    background: #ffffff;
    border-color: var(--accent-blue, #156cc2);
}

.mantine-Input-input:focus,
.mantine-Input-input.active {
    background: #ffffff;
    border-color: var(--accent-blue, #156cc2);
    box-shadow: 0 0 0 3px rgba(21, 108, 194, 0.12);
}

/* Hide native browser search cancel / clear buttons */
input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-results-button,
input[type="search"]::-webkit-search-results-decoration {
    -webkit-appearance: none;
    appearance: none;
    display: none !important;
}

.mantine-Select-input {
    cursor: pointer;
    user-select: none;
}

.mantine-Select-root {
    flex: 1.1;
    min-width: 220px;
    position: relative;
}

.mantine-Select-rightSection {
    position: absolute;
    right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    color: var(--text-muted, #757170);
    transition: transform 0.2s ease;
}

.mantine-Select-root.is-open .mantine-Select-rightSection {
    transform: rotate(180deg);
}

/* Action Buttons Group (Reset & Share) - Aligned to exact 38px input baseline */
.picker-action-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    height: 38px;
    margin-bottom: 0;
}

.share-link-anchor-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    width: 38px;
    text-decoration: none;
    line-height: 1;
}

.mantine-Button-root {
    height: 38px;
    width: 38px;
    min-width: 38px;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition-snappy);
    text-decoration: none;
    padding: 0;
    border: none;
    box-sizing: border-box;
}

/* Reset button: Cream tone with border */
.mantine-Button-root.btn-reset {
    background: var(--bg-card-warm, #f4efe9);
    border: 1px solid var(--border-subtle, rgba(97, 74, 68, 0.15));
    color: var(--text-secondary, #453f3d);
}

.mantine-Button-root.btn-reset:hover {
    background: #e9e3da;
    border-color: var(--accent-blue, #156cc2);
    color: var(--accent-blue, #156cc2);
    transform: translateY(-1px);
}

/* Share button: Vibrant blue as in Hammertime */
.mantine-Button-root.btn-share {
    background: #228be6;
    color: #ffffff;
    border: 1px solid #228be6;
}

.mantine-Button-root.btn-share:hover {
    background: #1c7ed6;
    border-color: #1c7ed6;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(34, 139, 230, 0.3);
}

.mantine-Button-root svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

/* ==========================================================================
   Table Styles: Entirely White, Clean Lines, Matching Screenshot
   No double colors: Clean white background for header and all body rows
   ========================================================================== */

.table-responsive-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.mantine-Table-root {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background: #ffffff;
}

/* Headers: Pure white background, no double colors */
.mantine-Table-root thead tr {
    border-bottom: 1px solid var(--border-subtle, rgba(97, 74, 68, 0.15));
}

.mantine-Table-root th {
    background: #ffffff;
    padding: 6px 12px 6px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted, #757170);
    font-family: var(--font-body);
}

.mantine-Table-root tbody tr {
    background: #ffffff;
    border-bottom: 1px solid var(--border-subtle, rgba(97, 74, 68, 0.1));
    transition: background 0.15s ease;
}

.mantine-Table-root tbody tr:last-child {
    border-bottom: none;
}

.mantine-Table-root tbody tr:hover {
    background: rgba(21, 108, 194, 0.025);
}

.mantine-Table-root td {
    background: #ffffff;
    padding: 5px 12px;
    vertical-align: middle;
}

/* Col 1: Icon (Clean, centered, no weird floats) */
.TimestampsTable-module-scss-module__XTTwbG__icon-column {
    width: 44px;
    text-align: center;
    color: var(--text-secondary, #453f3d);
}

.TimestampsTable-module-scss-module__XTTwbG__icon-column svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    opacity: 0.85;
}

/* Col 2: Chat Syntax (Blue copy button + Cream code block) */
.TimestampsTable-module-scss-module__XTTwbG__syntax-column {
    min-width: 230px;
}

.TimestampsTable-module-scss-module__XTTwbG__copy-syntax {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.mantine-ActionIcon-root {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 4px;
    background-color: #228be6;
    color: #ffffff;
    border: none;
    cursor: pointer;
    transition: background-color 0.15s ease, transform 0.1s ease;
    flex-shrink: 0;
}

.mantine-ActionIcon-root:hover {
    background-color: #1c7ed6;
    transform: scale(1.05);
}

.mantine-ActionIcon-root.copied {
    background-color: #0ea158;
}

.mantine-ActionIcon-root svg {
    width: 12px;
    height: 12px;
    fill: currentColor;
}

/* Code block: Cream background as requested */
.mantine-Code-root {
    font-family: var(--font-mono), monospace;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-primary, #1a1615);
    background: var(--bg-card-warm, #f4efe9);
    border: 1px solid var(--border-subtle, rgba(97, 74, 68, 0.15));
    padding: 3px 8px;
    border-radius: 4px;
    cursor: pointer;
    user-select: all;
    display: inline-block;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.mantine-Code-root:hover {
    border-color: var(--accent-blue, #156cc2);
    background: #ffffff;
    color: var(--accent-blue, #156cc2);
}

.TimestampsTable-module-scss-module__XTTwbG__example-text {
    display: none;
}

/* Col 3: Example Result */
.TimestampsTable-module-scss-module__XTTwbG__example-column {
    min-width: 230px;
}

.mantine-Text-root.mantine-cpbaqs {
    color: var(--text-secondary, #453f3d);
    font-size: 13px;
    font-family: var(--font-body);
    font-weight: 400;
}

/* ==========================================================================
   Date-Time Popover (Exact match to Screenshot 3)
   ========================================================================== */

.datetime-popover {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    width: 280px;
    background: #ffffff;
    border: 1px solid var(--border-subtle, rgba(97, 74, 68, 0.18));
    border-radius: 8px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.12);
    z-index: 200;
    padding: 14px;
    box-sizing: border-box;
    display: none;
    flex-direction: column;
    gap: 10px;
}

.datetime-popover.is-open {
    display: flex;
}

.picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.picker-month-title {
    background: transparent;
    border: none;
    cursor: pointer;
    border-radius: 4px;
    padding: 3px 8px;
    font-weight: 600;
    font-size: 13px;
    font-family: inherit;
    color: var(--text-primary, #1a1615);
    text-transform: capitalize;
    transition: background 0.15s ease, color 0.15s ease;
}

.picker-month-title:hover {
    background: var(--bg-card-warm, #f4efe9);
    color: var(--accent-blue, #156cc2);
}

.picker-nav-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary, #453f3d);
    width: 26px;
    height: 26px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.15s ease;
}

.picker-nav-btn:hover {
    background: var(--bg-card-warm, #f4efe9);
    color: var(--accent-blue, #156cc2);
}

.picker-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    text-align: center;
}

.picker-weekday {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted, #757170);
    padding: 4px 0;
    text-transform: lowercase;
}

.picker-day-btn {
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: transparent;
    border: none;
    color: var(--text-primary, #1a1615);
    font-size: 13px;
    cursor: pointer;
    transition: background 0.15s ease;
    position: relative;
}

.picker-day-btn:hover {
    background: var(--bg-card-warm, #f4efe9);
}

.picker-day-btn.other-month {
    color: rgba(97, 74, 68, 0.35);
}

.picker-day-btn.selected {
    background-color: #228be6;
    color: #ffffff;
    font-weight: 600;
}

/* Months Grid & Years Grid (Mantine / Hammertime multi-view style) */
.picker-months-grid,
.picker-years-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    padding: 4px 0;
}

.picker-cell-btn {
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: transparent;
    border: none;
    color: var(--text-primary, #1a1615);
    font-size: 13px;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.picker-cell-btn:hover {
    background: var(--bg-card-warm, #f4efe9);
}

.picker-cell-btn.other-range {
    color: rgba(97, 74, 68, 0.35);
}

.picker-cell-btn.selected {
    background-color: #228be6;
    color: #ffffff;
    font-weight: 600;
}

/* Popover Bottom Row: Time Input + Checkmark button (Screenshot 3) */
.picker-time-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 10px;
    border-top: 1px solid var(--border-subtle, rgba(97, 74, 68, 0.12));
    width: 100%;
    box-sizing: border-box;
}

.picker-time-single-input {
    flex: 1 1 0%;
    min-width: 0;
    width: 100%;
    height: 34px;
    background: var(--bg-card-warm, #f4efe9);
    border: 1px solid var(--border-subtle, rgba(97, 74, 68, 0.15));
    border-radius: 6px;
    color: var(--text-primary, #1a1615);
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 600;
    padding: 0 10px;
    outline: none;
    letter-spacing: 0.05em;
    box-sizing: border-box;
    transition: border-color 0.15s ease;
}

.picker-time-single-input:focus {
    border-color: #228be6;
    background: #ffffff;
}

.picker-btn-confirm {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    background: var(--bg-card-warm, #f4efe9);
    border: 1px solid var(--border-subtle, rgba(97, 74, 68, 0.15));
    border-radius: 6px;
    color: var(--text-secondary, #453f3d);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    transition: var(--transition-snappy);
    box-sizing: border-box;
    flex-shrink: 0;
}

.picker-btn-confirm:hover {
    background: #228be6;
    border-color: #228be6;
    color: #ffffff;
}

/* ==========================================================================
   Timezone Dropdown (Exact match to Screenshot 4 with functional scroll)
   ========================================================================== */

.tz-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    width: 100%;
    min-width: 260px;
    max-height: 280px;
    background: #ffffff;
    border: 1px solid var(--border-subtle, rgba(97, 74, 68, 0.18));
    border-radius: 6px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.12);
    z-index: 200;
    display: none;
    flex-direction: column;
    overflow: hidden;
    box-sizing: border-box;
}

.tz-dropdown.is-open {
    display: flex;
}

.tz-search-wrap {
    padding: 8px 10px;
    border-bottom: 1px solid var(--border-subtle, rgba(97, 74, 68, 0.12));
    background: var(--bg-card-warm, #f4efe9);
    position: relative;
    flex-shrink: 0;
}

.tz-search-input {
    width: 100%;
    height: 30px;
    background: #ffffff;
    border: 1px solid var(--border-subtle, rgba(97, 74, 68, 0.15));
    border-radius: 4px;
    color: var(--text-primary, #1a1615);
    padding: 0 8px 0 28px;
    font-size: 13px;
    outline: none;
    box-sizing: border-box;
}

.tz-search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted, #757170);
    font-size: 11px;
    pointer-events: none;
}

.tz-list {
    overflow-y: auto;
    max-height: 220px;
    padding: 4px;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(97, 74, 68, 0.25) transparent;
}

.tz-list::-webkit-scrollbar {
    width: 6px;
}

.tz-list::-webkit-scrollbar-track {
    background: transparent;
}

.tz-list::-webkit-scrollbar-thumb {
    background: rgba(97, 74, 68, 0.25);
    border-radius: 4px;
}

.tz-list::-webkit-scrollbar-thumb:hover {
    background: rgba(97, 74, 68, 0.4);
}

.tz-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 10px;
    border-radius: 4px;
    color: var(--text-secondary, #453f3d);
    font-size: 13px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.tz-item:hover,
.tz-item.highlighted {
    background: var(--bg-card-warm, #f4efe9);
    color: var(--text-primary, #1a1615);
}

.tz-item.selected {
    background: #25262b;
    color: #ffffff;
    font-weight: 500;
}

.tz-item-name {
    display: flex;
    align-items: center;
    gap: 6px;
}

.tz-item-offset {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted, #757170);
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast {
    background: #1a1615;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #ffffff;
    padding: 10px 16px;
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    animation: toastIn 0.2s ease, toastOut 0.2s ease 2.2s forwards;
    pointer-events: auto;
}

.toast i {
    color: #0ea158;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes toastOut {
    to { opacity: 0; transform: translateY(10px); }
}

/* Responsive */
@media (max-width: 767px) {
    .timestamps-page-wrapper {
        padding: 85px 0 30px;
    }
    .mantine-Paper-root {
        padding: 14px;
    }
    .mantine-Table-root th,
    .mantine-Table-root td {
        padding: 6px 8px;
    }
    .TimestampsTable-module-scss-module__XTTwbG__icon-column {
        display: none !important;
    }
    .datetime-popover {
        width: calc(100vw - 40px);
    }
}

/* ==========================================================================
   Adaptive Footer (Pinned to bottom of viewport without unnecessary scroll)
   ========================================================================== */
body.timestamps-page-body .seek-footer {
    margin-top: auto;
    padding: 34px 0 22px;
    background: var(--bg-card, #fbf9f6);
    border-top: 1px solid var(--border-subtle, rgba(97, 74, 68, 0.12));
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

body.timestamps-page-body .seek-footer-grid {
    display: grid;
    grid-template-columns: 2.2fr 1fr 1fr;
    gap: 36px;
    margin-bottom: 24px;
}

body.timestamps-page-body .seek-footer-brand {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

body.timestamps-page-body .footer-bio {
    font-size: 0.88rem;
    line-height: 1.55;
    max-width: 320px;
    color: var(--text-muted, #757170);
    margin: 0;
}

body.timestamps-page-body .footer-socials {
    display: flex;
    gap: 10px;
    margin-top: 2px;
}

body.timestamps-page-body .footer-social-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--bg-card-warm, #f4efe9);
    border: 1px solid var(--border-subtle, rgba(97, 74, 68, 0.15));
    color: var(--text-secondary, #453f3d);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-snappy);
    text-decoration: none;
    font-size: 13px;
}

body.timestamps-page-body .footer-social-btn:hover {
    background: #ffffff;
    border-color: var(--accent-blue, #156cc2);
    color: var(--accent-blue, #156cc2);
    transform: translateY(-2px);
}

body.timestamps-page-body .seek-footer-col {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

body.timestamps-page-body .footer-col-title {
    font-family: var(--font-heading);
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-primary, #1a1615);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
}

body.timestamps-page-body .footer-col-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    padding: 0;
}

body.timestamps-page-body .footer-link {
    font-size: 0.88rem;
    color: var(--text-muted, #757170);
    text-decoration: none;
    transition: var(--transition-snappy);
}

body.timestamps-page-body .footer-link:hover {
    color: var(--accent-blue, #156cc2);
    transform: translateX(3px);
}

body.timestamps-page-body .seek-footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid var(--border-subtle, rgba(97, 74, 68, 0.1));
    font-size: 0.82rem;
    color: var(--text-muted, #757170);
}

@media (max-width: 820px) {
    body.timestamps-page-body .seek-footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}
