/* --- All Time Formats Page Design Tokens & Styles --- */
:root {
    --font-display: 'Outfit', Arial, sans-serif;
    --font-sans: 'Outfit', Arial, sans-serif;
    --font-mono: 'Inconsolata', monospace;
    
    --brand-primary: #DD356E;
    --brand-accent: #0284c7;
    --brand-info: #0284c7;
    --brand-success: #059669;
    --brand-danger: #dc2626;
    
    --bg-color: #f8fafc;
    --text-color: #0f172a;
    --text-muted: #64748b;
    --panel-bg: #ffffff;
    --border-color: #e2e8f0;
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.12);
    --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

body, p, span, a, h1, h2, h3, h4, h5, h6, input, button, select, textarea, label {
    font-family: var(--font-sans) !important;
}

#fh5co-all-time-formats {
    background-color: var(--bg-color);
    padding: 40px 0 60px 0;
}

/* --- Hero Section Design --- */
.hero-section {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    position: relative;
    padding: 50px 0 40px 0;
    text-align: center;
    color: var(--text-color);
    overflow: hidden;
    border-bottom: 1px solid var(--border-color);
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: radial-gradient(hsla(220, 20%, 80%, 0.4) 1px, transparent 1px);
    background-size: 24px 24px;
    pointer-events: none;
}

.hero-section__container {
    position: relative;
    z-index: 2;
    max-width: 850px;
    margin: 0 auto;
    padding: 0 20px;
}

.hero-section h1 {
    font-size: 38px;
    font-weight: 800;
    margin: 0 0 10px 0;
    letter-spacing: -0.02em;
    background: linear-gradient(to right, #0f172a 40%, var(--brand-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-section p {
    font-size: 16px;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0 0 25px 0;
    font-weight: 400;
}

.tf-hero-clock-card {
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 25px;
    box-shadow: var(--shadow-lg);
    display: inline-block;
    width: 100%;
    max-width: 650px;
}

.tf-live-time-display {
    font-family: var(--font-mono) !important;
    font-size: 38px;
    font-weight: 700;
    color: #38bdf8;
    text-shadow: 0 0 15px rgba(56, 189, 248, 0.4);
    letter-spacing: 1px;
    margin: 10px 0;
    word-break: break-all;
}

.tf-meta-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}

.tf-badge {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #e2e8f0;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

/* --- Playground Section --- */
.tf-playground-card {
    background: var(--panel-bg);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    padding: 25px;
    margin-top: -30px;
    margin-bottom: 40px;
    box-shadow: var(--shadow-md);
    position: relative;
    z-index: 10;
}

.tf-section-heading {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 8px;
}

.tf-preset-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.tf-preset-pill {
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #cbd5e1;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.tf-preset-pill:hover {
    background: var(--brand-primary);
    color: #ffffff;
    border-color: var(--brand-primary);
}

.tf-playground-preview {
    background: #0f172a;
    color: #38bdf8;
    font-family: var(--font-mono) !important;
    font-size: 22px;
    font-weight: 700;
    padding: 15px 20px;
    border-radius: 8px;
    margin-top: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 60px;
    word-break: break-all;
}

.tf-validity-status {
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 4px;
    font-family: var(--font-sans) !important;
    font-weight: 600;
}

.tf-validity-status.valid {
    background: var(--brand-success);
    color: #ffffff;
}

.tf-validity-status.invalid {
    background: var(--brand-danger);
    color: #ffffff;
}

/* --- Filter Toolbar --- */
.tf-filter-toolbar {
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

@media (min-width: 768px) {
    .tf-filter-toolbar {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.tf-search-box {
    position: relative;
    max-width: 400px;
    width: 100%;
}

.tf-search-box input {
    padding-left: 35px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    height: 42px;
}

.tf-search-box .search-icon {
    position: absolute;
    left: 12px;
    top: 13px;
    color: var(--text-muted);
}

.tf-cat-filter-btn {
    background: #ffffff;
    border: 1px solid var(--border-color);
    color: #475569;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-smooth);
    margin-right: 5px;
    margin-bottom: 5px;
}

.tf-cat-filter-btn.active, .tf-cat-filter-btn:hover {
    background: var(--brand-primary);
    color: #ffffff;
    border-color: var(--brand-primary);
}

/* --- Format Cards Grid & Header Layout --- */
.tf-category-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-color);
    margin-top: 35px;
    margin-bottom: 20px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border-color);
}

.tf-card-row {
    display: flex;
    flex-wrap: wrap;
    margin-left: -10px;
    margin-right: -10px;
}

.tf-card-wrapper {
    padding-left: 10px;
    padding-right: 10px;
    margin-bottom: 20px;
    display: flex;
}

.tf-card {
    background: var(--panel-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
}

.tf-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--brand-primary);
}

/* Header layout: Pattern code gets full space; Category badge wraps onto next line if space is tight */
.tf-card-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
    width: 100%;
}

.tf-pattern-code {
    font-family: var(--font-mono) !important;
    font-size: 15px;
    font-weight: 700;
    color: var(--brand-primary);
    background: #fff5f8;
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid #fecdd3;
    display: inline-block;
    white-space: normal;
    word-break: normal;
    overflow: visible; /* Unscrollable, full length display */
    max-width: 100%;
    line-height: 1.4;
}

.tf-card-badge {
    font-size: 11px;
    font-weight: 600;
    color: #475569;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    padding: 3px 8px;
    border-radius: 12px;
    display: inline-block;
    white-space: normal;
    word-break: break-word; /* Label moves to next line if space is tight */
    max-width: 100%;
    margin-top: 2px;
}

.tf-converted-value {
    font-family: var(--font-mono) !important;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-color);
    margin: 10px 0 16px 0;
    background: #f8fafc;
    padding: 12px 14px;
    border-radius: 8px;
    border-left: 4px solid var(--brand-primary);
    word-break: break-all;
    min-height: 52px;
    display: flex;
    align-items: center;
}

.tf-card-actions {
    display: flex;
    gap: 6px;
    margin-top: auto; /* Push actions to the bottom */
    flex-wrap: wrap;
    align-items: center;
}

.tf-action-btn {
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: #ffffff;
    color: #334155;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.tf-action-btn:hover {
    background: #f1f5f9;
    color: var(--text-color);
}

.tf-action-btn.primary-action {
    background: var(--brand-primary);
    color: #ffffff;
    border-color: var(--brand-primary);
}

.tf-action-btn.primary-action:hover {
    opacity: 0.9;
}

/* Toast notification */
.tf-toast {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background: #0f172a;
    color: #ffffff;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    z-index: 9999;
    display: none;
    align-items: center;
    gap: 8px;
}

/* Token Cheatsheet Table */
.tf-cheatsheet-table {
    background: var(--panel-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin-top: 30px;
    border: 1px solid var(--border-color);
}

.tf-cheatsheet-table th {
    background: #f8fafc;
    color: #334155;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}
