/* Utilities for flexbox, spacing, typography, and common layouts */

/* Flexbox Layouts */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.flex-row { display: flex; flex-direction: row; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.items-baseline { align-items: baseline; }
.items-stretch { align-items: stretch; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.justify-start { justify-content: flex-start; }
.flex-1 { flex: 1; }
.shrink-0 { flex-shrink: 0; }

/* Grids */
.grid-cols-2 { display: grid; grid-template-columns: 1fr 1fr; }

/* Spacing - Gaps */
.gap-4 { gap: 4px; }
.gap-6 { gap: 6px; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.gap-32 { gap: 32px; }

/* Spacing - Margins */
.m-0 { margin: 0 !important; }
.mt-0 { margin-top: 0 !important; }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-0 { margin-bottom: 0 !important; }
.mb-4 { margin-bottom: 4px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.mr-4 { margin-right: 4px; }
.mr-8 { margin-right: 8px; }
.mr-auto { margin-right: auto; }
.ml-auto { margin-left: auto; }
.my-16 { margin-top: 16px; margin-bottom: 16px; }

/* Spacing - Paddings */
.p-0 { padding: 0 !important; }
.p-16 { padding: 16px; }
.p-24 { padding: 24px; }
.p-32 { padding: 32px; }
.p-32-40 { padding: 32px 40px; }
.py-4 { padding-top: 4px; padding-bottom: 4px; }
.py-8 { padding-top: 8px; padding-bottom: 8px; }
.py-12 { padding-top: 12px; padding-bottom: 12px; }
.py-16 { padding-top: 16px; padding-bottom: 16px; }
.py-6 { padding-top: 6px; padding-bottom: 6px; }
.px-8 { padding-left: 8px; padding-right: 8px; }
.px-12 { padding-left: 12px; padding-right: 12px; }
.px-16 { padding-left: 16px; padding-right: 16px; }
.px-24 { padding-left: 24px; padding-right: 24px; }
.pl-4 { padding-left: 4px; }

/* Typography */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-lg { font-size: 1.2rem; }
.text-md { font-size: 1.1rem; }
.text-sm { font-size: 0.9rem; }
.text-xs { font-size: 0.8rem; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: bold; }
.text-muted { color: var(--text-muted); }
.text-danger { color: var(--danger-color); }
.text-primary { color: var(--primary); }
.text-secondary { color: var(--text-secondary); }
.text-color { color: var(--text-color); }
.text-main { color: var(--text-main); }
.whitespace-nowrap { white-space: nowrap; }
.leading-none { line-height: 1; }

/* Display & Visibility */
.hidden { display: none; }
.block { display: block; }
.inline-block { display: inline-block; }
.resize-y { resize: vertical; }

.opacity-30 { opacity: 0.3; }
.relative { position: relative; }
.absolute { position: absolute; }
.align-middle { vertical-align: middle; }

/* Sizing */
.w-full { width: 100%; }
.w-auto { width: auto; }
.w-18 { width: 18px; }
.w-32 { width: 32px; }
.w-40 { width: 40px; }
.w-140 { width: 140px; }
.h-full { height: 100%; }
.h-18 { height: 18px; }
.h-32 { height: 32px; }
.h-40 { height: 40px; }
.min-w-200 { min-width: 200px; }
.min-w-250 { min-width: 250px; }
.max-w-600 { max-width: 600px; }

/* Misc */
.cursor-pointer { cursor: pointer; }
.bg-transparent { background: transparent; }
.bg-white { background: white; }
.bg-success { background-color: #10b981; }
.border-none { border: none; }
.rounded-full { border-radius: 50%; }
.rounded-sm { border-radius: 4px; }
.rounded-md { border-radius: 6px; }
.rounded-lg { border-radius: 8px; }
.overflow-hidden { overflow: hidden; }
.overflow-y-auto { overflow-y: auto; }
.overflow-x-auto { overflow-x: auto; }
.max-h-150 { max-height: 150px; }
.select-none { user-select: none; }
.divider { border: 0; border-top: 1px solid rgba(0,0,0,0.1); }
.transition-all { transition: all 0.2s; }
.transition-opacity-height { transition: opacity 0.3s ease, height 0.3s ease; }

/* Custom Layouts & Additions */
.leading-snug { line-height: 1.4; }
.text-base { font-size: 16px; }
.font-normal { font-weight: normal; }
.grid-auto-fill-300 { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.text-left { text-align: left; }
.bg-light-gray { background: rgba(0,0,0,0.02); }
.bg-gray-200 { background: #eee; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.border-b { border-bottom: 1px solid var(--glass-border); }
.border-b-light { border-bottom: 1px solid rgba(0,0,0,0.05); }
.border-t { border-top: 1px solid var(--glass-border); }
.border-t-2 { border-top: 2px solid var(--glass-border); }
.max-h-40 { max-height: 40px; }
.max-h-500 { max-height: 500px; }
.sticky-header { position: sticky; top: 0; z-index: 10; background: rgba(255,255,255,0.95); backdrop-filter: blur(8px); }
.object-contain { object-fit: contain; }
.pt-8 { padding-top: 8px; }
.text-\[11px\] { font-size: 11px; }
.text-\[0\.75rem\] { font-size: 0.75rem; }
.no-underline { text-decoration: none; }
.text-warning { color: #eab308; }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-primary { color: var(--primary) !important; }
.opacity-60 { opacity: 0.6; }
.opacity-50 { opacity: 0.5; }
.mt-3 { margin-top: 3px; }

/* Typography */
.font-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }
.tabular-nums { font-variant-numeric: tabular-nums; }

/* Planner Mode Editor Overrides */
body.is-planner-mode #comment-form .ql-toolbar {
    display: none !important;
}
body.is-planner-mode #comment-form .ql-container,
body.is-planner-mode #comment-form #comment-content {
    display: none !important;
}
body.is-planner-mode #comment-content-text {
    display: block !important;
}
#comment-content-text {
    display: none;
}

/* Remove number input spinners */
.grid-edit-input::-webkit-outer-spin-button,
.grid-edit-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.grid-edit-input[type=number] {
  -moz-appearance: textfield;
}
.min-w-0 { min-width: 0 !important; }

/* Time Tracking Edit Grid */
.time-edit-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: 1fr;
}
@media (min-width: 768px) {
    .time-edit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
    .time-edit-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1280px) {
    .time-edit-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
