/* ==============================
   CarlottaX – Project Detail Styles
   basiert auf base.css
   ============================== */

main {
    flex: 1;
    padding: 2rem;
    margin-left: 220px; /* Platz für Sidebar */
}

h1 {
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    color: var(--c-accent-2);
}

h2 {
    margin-bottom: 1rem;
    color: var(--c-accent);
}

/* ---- Project Info ---- */
#project-info {
    background: var(--c-surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}

#project-description {
    margin: 0.5rem 0 0 0;
    font-size: 0.95rem;
}

/* ---- Create Task Button ---- */
#create-task-section {
    margin-bottom: 1.5rem;
}

#open-task-modal {
    font-size: 1rem;
    padding: 0.75rem 1.25rem;
}

/* ---- Tasks Board ---- */
.tasks-board {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(280px, 1fr);
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 1rem;
}

.task-column {
    background: var(--c-surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    max-height: 80vh;
}

.task-column h3 {
    margin: 0;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid color-mix(in oklab, var(--c-muted) 20%, transparent);
    font-size: 1.05rem;
    background: color-mix(in oklab, var(--c-accent-2) 8%, transparent);
    border-radius: var(--radius) var(--radius) 0 0;
}

.task-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem;
}

/* Drag & Drop */
.task-column.drag-over {
    outline: 2px dashed var(--c-accent-2);
    outline-offset: -4px;
}

/* ---- Task Cards ---- */
.task-card {
    background: var(--c-surface-solid);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
    cursor: grab;
    transition: transform var(--transition), box-shadow var(--transition);
    border: 1px solid color-mix(in oklab, var(--c-muted) 15%, transparent);
}

.task-card:active {
    cursor: grabbing;
}

.task-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.task-card h4 {
    margin: 0.5rem 0;
    font-size: 1rem;
}

.task-card p {
    margin: 0.2rem 0;
    font-size: 0.85rem;
    color: var(--c-muted);
}

/* Task Header */
.task-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
}

.task-type {
    font-size: 0.75rem;
    font-weight: 600;
    background: color-mix(in oklab, var(--c-accent) 15%, transparent);
    color: var(--c-accent);
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
}

.task-priority {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
}

/* Priority Variants */
.task-priority.priority-high {
    background: color-mix(in oklab, crimson 20%, transparent);
    color: crimson;
}
.task-priority.priority-medium {
    background: color-mix(in oklab, orange 20%, transparent);
    color: darkorange;
}
.task-priority.priority-low {
    background: color-mix(in oklab, var(--c-accent-2) 20%, transparent);
    color: var(--c-accent-2);
}
.task-priority.priority-none {
    background: color-mix(in oklab, var(--c-muted) 20%, transparent);
    color: var(--c-muted);
}

/* ---- Modal Overlay ---- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal {
    background: var(--c-surface-solid);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 1.5rem;
    max-width: 500px;
    width: 100%;
    animation: fadeIn 0.25s ease;
    position: relative;
}

.modal-large {
    max-width: 800px;
}

.modal h3, .modal h2 {
    margin-top: 0;
    color: var(--c-accent);
}

.modal .close {
    position: absolute;
    top: 0.5rem;
    right: 0.75rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--c-muted);
}

.modal .close:hover {
    color: var(--c-accent);
}

/* ---- Modal Form ---- */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.form-row {
    display: flex;
    flex-direction: column;
}

.form-row label {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.form-row input,
.form-row select,
.form-row textarea {
    width: 100%;
}

.form-row small {
    color: var(--c-muted);
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

.form-actions {
    margin-top: 1.5rem;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* ---- Confirm Modal ---- */
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

.btn-cancel,
.btn-confirm {
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    font-weight: 600;
}

.btn-cancel {
    background: var(--c-muted);
    color: #fff;
}

.btn-cancel:hover {
    background: color-mix(in oklab, var(--c-muted) 70%, black);
}

.btn-confirm {
    background: crimson;
    color: #fff;
}

.btn-confirm:hover {
    background: darkred;
}

.task-id {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    background: color-mix(in oklab, var(--c-accent) 15%, transparent);
    color: var(--c-accent);
    font-size: 0.75rem;
    font-weight: 600;
}

/* ---- Animations ---- */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}
