@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;500&family=DM+Mono&family=Outfit:wght@200;400;600&display=swap');
@import 'themes-and-layouts.css';

/* Default Theme */
:root {
    --primary: #2563eb;
    --danger: #dc2626;
    --success: #059669;
    --background: #f8fafc;
    --surface: #ffffff;
    --text: #1e293b;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    margin: 0;
    padding: 20px;
    background-color: var(--background);
    color: var(--text);
    line-height: 1.5;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background-color: var(--surface);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--text);
}

.controls {
    margin-bottom: 2rem;
    display: flex;
    gap: 12px;
}

.timers-container {
    display: flex;
    flex-direction: column;
    position: relative;
}

.timer-row {
    display: grid;
    grid-template-columns: 2fr 3fr 1fr 1fr;
    gap: 12px;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
    transition: all 0.3s ease-in-out;
    transform-origin: top;
    position: relative;
    max-height: 3em;
    opacity: 1;
}

.timer-row.removing {
    max-height: 0;
    opacity: 0.3;
    overflow: hidden;
    margin: 0;
    padding: 0;
}
.timer-row:hover {
    background-color: #f1f5f9;
}

input {
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

button {
    display: flex; /* Use flexbox for alignment */
    align-items: center; /* Center items vertically */
    justify-content: center; /* Center items horizontally */
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.95rem;
    height:40px;
}

button:hover {
    transform: translateY(-1px);
}

button:active {
    transform: translateY(0);
}

.controls button {
    background-color: var(--primary);
    color: white;
}

.controls button:hover {
    background-color: #1d4ed8;
}

button.done-again {
    background-color: var(--success);
    color: white;
}

button.done-again:hover {
    background-color: #047857;
}

button.delete {
    background-color: var(--danger);
    color: white;
}

button.delete:hover {
    background-color: #b91c1c;
}

.elapsed-time {
    font-family: 'SF Mono', 'Cascadia Code', Menlo, monospace;
    font-size: 1rem;
    color: var(--text);
}

.tag-filters {
    margin: 1rem 0;
    padding: 0.5rem;
    border-radius: 8px;
    background: #f1f5f9;
}

.tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    margin: 0.25rem;
    border-radius: 1rem;
    background: #e2e8f0;
    cursor: pointer;
    transition: all 0.2s;
}

.tag:hover {
    background: #cbd5e1;
}

.tag.active {
    background: var(--primary);
    color: white;
}

/* Typography */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;500&family=DM+Mono&family=Outfit:wght@200;400;600&display=swap');

[data-theme] {
    --font-display: 'Space Grotesk', system-ui;
    --font-mono: 'DM Mono', monospace;
    --font-body: 'Outfit', sans-serif;
}

h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 500;
}

.elapsed-time {
    font-family: var(--font-mono);
}

input, button {
    font-family: var(--font-body);
}

/* Refined Input Fields */
input[type="text"] {
    background: color-mix(in srgb, var(--primary) 8%, transparent);
    border: 1px solid color-mix(in srgb, var(--primary) 30%, transparent);
    color: var(--text);
    padding: 0.5rem;
    border-radius: 2px;
}

input[type="text"]:focus {
    background: color-mix(in srgb, var(--primary) 12%, transparent);
    border-color: var(--primary);
    outline: none;
}

/* Sharper Containers */
.timer-row {
    border-radius: 2px;
}

.tag {
    border-radius: 2px;
}

button {
    border-radius: 2px;
}

[data-layout="grid"] .timer-row {
    border-radius: 4px;
}

/* to manage the layout of the input box*/
.timing-controls {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.custom-time {
    display: flex;
    align-items: center;
    gap: 8px;
}

#addTimerButton, #addTimerAgoButton {
    width: 120px;  /* or whatever width works best */
}

#timeAmount {
    width: 60px;
}

#timeUnit {
    padding: 4px;
}

.big_I {
    font-size: 2em;
    display: inline-flex;
    align-items: center;
    margin-right: 0.5em;
}

#timeAmount {
    height: 1em;
    border-radius: 0;
}

#newTimerName {
    width: 150%;
}

.timing-controls {
    display: flex;
    flex-direction: column;
    gap: .2em;
}

#addTimerButton {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.2em;
    margin-bottom: 0.2em;
}

.controls hr {
    width: 100%;
}