/* Native app safe area margins (set by site.js when running in iOS/Android webview) */
:root {
    --base-font-size: 18px;
    --native-margin-top: 0;
    --native-margin-bottom: 0;
}

body {
    font-family: "Lexend", sans-serif;
    font-size: var(--base-font-size);
}

/* Custom scrollbar for dark theme */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #1e293b;
}

::-webkit-scrollbar-thumb {
    background: #475569;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* Task Card Styles */
.task-card {
    position: relative;
    background-color: #0f172a;
    border-radius: 0.5rem;
    display: flex;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
}

.task-card.draggable {
    cursor: grab;
}

.task-card.draggable:active {
    cursor: grabbing;
}

.task-card.dragging {
}

.task-card.drag-over {
    outline: 2px solid #60a5fa;
    outline-offset: -2px;
}

/* Blocked Status Bar */
.blocked-status-bar {
    flex-shrink: 0;
    width: 1.5rem;
    height: 100%;
    border-top-left-radius: 0.5rem;
    border-bottom-left-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s;
}

.blocked-status-bar.ready {
    background-color: rgba(34, 197, 94, 0.8);
}

.blocked-status-bar.ready:hover {
    background-color: rgb(34, 197, 94);
}

.blocked-status-bar.blocked {
    background-color: rgba(239, 68, 68, 0.8);
}

.blocked-status-bar.blocked:hover {
    background-color: rgb(239, 68, 68);
}

.blocked-status-bar.on-hold {
    background-color: rgba(234, 179, 8, 0.8);
}

.blocked-status-bar.on-hold:hover {
    background-color: rgb(234, 179, 8);
}

.blocked-status-text {
    font-size: 9px;
    font-weight: 700;
    color: white;
    letter-spacing: 0.05em;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
}

/* Task Type Badges */
.task-type-badge {
    font-size: 10px;
    font-weight: 500;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.task-type-badge.frontend {
    background-color: rgba(34, 197, 94, 0.3);
    color: rgb(134, 239, 172);
}

.task-type-badge.backend {
    background-color: rgba(14, 165, 233, 0.3);
    color: rgb(125, 211, 252);
}

.task-type-badge.database {
    background-color: rgba(234, 179, 8, 0.3);
    color: rgb(253, 224, 71);
}

/* Activity Type Badges (learning: flashcards, quiz, journal, long-form-answer) */
.activity-type-badge {
    font-size: 18px;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

.activity-type-badge:hover {
    filter: brightness(1.1);
}

.activity-type-flashcards {
    background-color: rgba(245, 158, 11, 0.35);
    color: rgb(253, 230, 138);
}

.activity-type-quiz {
    background-color: rgba(16, 185, 129, 0.35);
    color: rgb(167, 243, 208);
}

.activity-type-journal {
    background-color: rgba(139, 92, 246, 0.35);
    color: rgb(216, 180, 254);
}

.activity-type-long_form_answer {
    background-color: rgba(6, 182, 212, 0.35);
    color: rgb(165, 243, 252);
}

/* Group Pill */
.group-pill {
    font-size: 1.125rem;
    font-weight: 500;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
}

.group-pill.editable {
    cursor: text;
}

.group-pill.empty {
    background-color: rgba(71, 85, 105, 0.5);
    color: rgb(148, 163, 184);
    font-style: italic;
    cursor: text;
}

.group-pill.empty:hover {
    background-color: rgb(71, 85, 105);
}

/* Task Title */
.task-title {
    color: white;
    font-weight: 500;
    font-size: 1.25rem;
}

.task-title.editable {
    cursor: text;
    border-radius: 0.25rem;
    padding: 0 0.25rem;
    margin: 0 -0.25rem;
}

.task-title.editable:hover {
    background-color: rgba(71, 85, 105, 0.5);
}

/* Task Description */
.task-description {
    color: rgb(148, 163, 184);
    font-size: 1.125rem;
    margin-top: 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 6;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.task-description.editable {
    cursor: text;
    border-radius: 0.25rem;
    padding: 0 0.25rem;
    margin-left: -0.25rem;
    margin-right: -0.25rem;
    min-height: 24px;
}

.task-description.editable:hover {
    background-color: rgba(71, 85, 105, 0.5);
}

.task-description.empty {
    font-style: italic;
}

/* Step Styles */
.step-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem;
    margin: 0 -0.25rem;
    border-radius: 0.25rem;
    font-size: 1rem;
    cursor: grab;
}

.step-item.dragging {
    opacity: 0.5;
}

/* Step Type Toggle */
.step-type-toggle {
    padding: 0.125rem 0.375rem;
    font-size: 10px;
    font-weight: 500;
    border-radius: 0.25rem;
    flex-shrink: 0;
    transition: background-color 0.2s;
}

.step-type-toggle.frontend {
    background-color: rgba(34, 197, 94, 0.3);
    color: rgb(134, 239, 172);
}

.step-type-toggle.frontend:hover {
    background-color: rgba(34, 197, 94, 0.5);
}

.step-type-toggle.backend {
    background-color: rgba(14, 165, 233, 0.3);
    color: rgb(125, 211, 252);
}

.step-type-toggle.backend:hover {
    background-color: rgba(14, 165, 233, 0.5);
}

.step-type-toggle.database {
    background-color: rgba(234, 179, 8, 0.3);
    color: rgb(253, 224, 71);
}

.step-type-toggle.database:hover {
    background-color: rgba(234, 179, 8, 0.5);
}

/* Screenshot Toggle */
.screenshot-toggle {
    position: relative;
    flex-shrink: 0;
    transition: color 0.2s;
}

.screenshot-toggle.active {
    color: rgb(74, 222, 128);
}

.screenshot-toggle.active:hover {
    color: rgb(134, 239, 172);
}

.screenshot-toggle.inactive {
    color: rgb(100, 116, 139);
}

.screenshot-toggle.inactive:hover {
    color: rgb(148, 163, 184);
}

.screenshot-toggle-badge {
    position: absolute;
    top: -0.25rem;
    right: -0.25rem;
    font-size: 8px;
    font-weight: 700;
}

/* Step Remove Button */
.step-remove-btn {
    opacity: 0;
    color: rgb(100, 116, 139);
    transition: all 0.2s;
    flex-shrink: 0;
}

.step-item:hover .step-remove-btn {
    opacity: 1;
}

.step-remove-btn:hover {
    color: rgb(248, 113, 113);
}

/* Input Styles */
.task-input {
    width: 100%;
    background-color: rgb(71, 85, 105);
    color: white;
    font-size: 1.125rem;
    border: 1px solid rgb(100, 116, 139);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
}

.task-input:focus {
    outline: none;
    border-color: rgb(59, 130, 246);
}

.task-input.small {
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
}

.task-textarea {
    width: 100%;
    background-color: rgb(71, 85, 105);
    color: white;
    font-size: 1.125rem;
    border: 1px solid rgb(100, 116, 139);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    resize: none;
}

.task-textarea:focus {
    outline: none;
    border-color: rgb(59, 130, 246);
}

.task-textarea.small {
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
}

/* Edit Input Styles */
.task-edit-input {
    background-color: rgb(71, 85, 105);
    color: white;
    border: 1px solid rgb(59, 130, 246);
    border-radius: 0.5rem;
    padding: 0.25rem 0.5rem;
}

.task-edit-input:focus {
    outline: none;
}

.task-edit-input.title {
    flex: 1;
    font-weight: 500;
    font-size: 1.25rem;
}

.task-edit-input.group {
    font-size: 1.125rem;
    border-radius: 9999px;
    padding: 0.25rem 0.75rem;
    width: 8rem;
}

.task-edit-textarea {
    width: 100%;
    background-color: rgb(71, 85, 105);
    color: rgb(203, 213, 225);
    font-size: 1.125rem;
    border: 1px solid rgb(59, 130, 246);
    border-radius: 0.5rem;
    padding: 0.5rem;
    margin-top: 0.25rem;
    resize: none;
}

.task-edit-textarea:focus {
    outline: none;
}

/* Min/Max Button */
.task-collapse-btn {
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    background-color: rgb(51, 65, 85);
    transition: background-color 0.2s;
}

.task-collapse-btn:hover {
    background-color: rgb(71, 85, 105);
}
