html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #0071c1;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5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bGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #1b6ec2;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

code {
    color: #c02d76;
}

/* Calendar Bar Colors */
.stage-bar {
    background-color: #F3F4F6 !important;
    color: #111827 !important;
    border: 1px solid #E5E7EB !important;
    border-radius: 8px !important;
}

.fc .stage-bar .fc-event-main,
.fc .stage-bar .fc-event-main-frame {
    background-color: #F3F4F6 !important;
    color: #111827 !important;
}

.stage-bar .stage-event {
    padding: 6px 10px;
}

.stage-bar .ph {
    font-size: 16px;
}

.bar-blue {
    background-color: #DBEAFE !important;
    color: #1D4ED8 !important;
    border: 1px solid #BFDBFE !important;
    border-radius: 8px !important;
}

.bar-purple {
    background-color: #E9D5FF !important;
    color: #7E22CE !important;
    border: 1px solid #D8B4FE !important;
    border-radius: 8px !important;
}

.bar-orange {
    background-color: #FFEDD5 !important;
    color: #C2410C !important;
    border: 1px solid #FED7AA !important;
    border-radius: 8px !important;
}

.bar-green {
    background-color: #DCFCE7 !important;
    color: #15803D !important;
    border: 1px solid #BBF7D0 !important;
    border-radius: 8px !important;
}

/* Deliverable bar style - smaller and sits above the stage bar */
.deliverable-bar {
    background-color: #eef2ff !important;
    color: #0f172a !important;
    border: 1px solid rgba(15,23,42,0.06) !important;
    border-radius: 8px !important;
    box-sizing: border-box;
    padding: 6px 10px;
    overflow: visible !important; /* allow todo bars positioned outside to be visible */
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    font-size: 13px;
}

.deliverable-bar .deliverable-title,
.deliverable-bar .deliverable-dates {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.deliverable-bar .deliverable-dates {
    font-size: 12px;
    color: rgba(15, 23, 42, 0.75);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* ToDo / task bars that appear under deliverables */
.todo-bar {
    position: absolute; /* positioned inline from component */
    display: flex;
    align-items: center;
    gap: 8px;
    box-sizing: border-box;
    padding: 0 10px;
    background: #d8b4fe; /* light purple */
    color: #1f1f1f;
    border-radius: 6px;
    box-shadow: 0 1px 0 rgba(0,0,0,0.04);
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    z-index: 5; /* above deliverable bar */
}
.todo-bar .todo-icon {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #5b21a8; /* darker purple so icon is visible */
    background: rgba(0,0,0,0.04);
    border-radius: 4px;
    font-size: 14px;
    line-height: 1;
}
.todo-bar .todo-title {
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Ensure stage bars act as a background stripe and deliverables sit visually on top */
#timeline-calendar .fc .stage-bar .fc-event-main,
#timeline-calendar .fc .stage-bar .fc-event-main-frame {
    background-color: #F3F4F6 !important;
    color: #111827 !important;
}

#timeline-calendar .fc .deliverable-bar .fc-event-main,
#timeline-calendar .fc .deliverable-bar .fc-event-main-frame {
    background-color: transparent !important; /* use our class colors */
}

/* Height control so stage shows full row and deliverables are shorter */
/* Make the stage event look like a wide white box inside the calendar row */
#timeline-calendar .fc .stage-bar .fc-event-main {
    height: 96px !important; /* taller box for stage */
    padding: 14px 18px !important;
    background: #ffffff !important;
    border: 1px solid rgba(15,23,42,0.04) !important;
    border-radius: 12px !important;
    box-shadow: 0 6px 20px rgba(2,6,23,0.06) !important;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.stage-event.stage-box {
    width: 100%;
}

.stage-event .stage-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.stage-event .stage-title {
    font-weight: 700;
    font-size: 16px;
    color: #0f172a;
    margin-bottom: 6px;
}

.stage-event .stage-description {
    margin-top: 10px;
    color: #6b7280;
}

.btn-create-deliverable {
    background: #2b2f6b;
    color: #fff;
    border-radius: 8px;
    padding: 8px 12px;
    border: 0;
}

/* Deliverables should be shorter and appear above the stage box (visually inside) */
#timeline-calendar .fc .deliverable-bar .fc-event-main {
    height: 34px !important;
    padding: 6px 10px !important;
    border-radius: 8px !important;
    z-index: 3;
    position: relative;
    margin-top: -44px !important; /* lift deliverable into the stage box */
}

/* Ensure the timeline row has enough height to show the stage box */
@media (min-width: 768px) {
    #timeline-calendar .fc .fc-timeline-slot {
        min-height: 120px;
    }
}

/* Add vertical spacing between stacked timeline bars */
.fc .fc-timeline-event.fc-event {
    margin-top: 6px;
    margin-bottom: 6px;
}

/* Hide the empty resource column header */
.fc-col-header-cell.fc-resource-group {
    display: none;
}

/* Timeline / Figma-specific styles moved from main.css */
.full-calendar.timeline-calendar {
    /* Restore a comfortable top padding so the calendar toolbar stays above the stage box */
    padding: 20px 24px;
}

.timeline-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(2, 6, 23, 0.06);
    padding: 20px;
    margin: 12px 0;
}

/* Stage info box that visually sits on top of the calendar (Figma-style) */
.timeline-stage-box {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(2,6,23,0.06);
    padding: 20px;
    border: 1px solid rgba(15,23,42,0.04);    
    position: relative;
    z-index: 2; /* sit above calendar body but below toolbar */
}

.timeline-stage-info {
    flex: 1 1 320px;
    min-width: 260px;
}

.timeline-stage-date {
    display: flex;
    align-items: center;
    gap: 6px;
}

.timeline-deliverables-box {
    background: #ffffff;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    padding: 10px 12px;
    min-width: 320px;
    max-width: 100%;
}

.timeline-deliverables-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.timeline-deliverable-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid #F3F4F6;
    font-size: 13px;
    color: #111827;
}

.timeline-deliverable-item:last-child {
    border-bottom: 0;
}

.timeline-deliverable-item .ph {
    font-size: 16px;
    margin-top: 1px;
}

@media (max-width: 768px) {
    .timeline-stage-box { margin-top: -40px; padding: 16px; }
}

#timeline-calendar .fc {
    font-family: 'Montserrat', sans-serif;
    color: #0f172a;
}

#timeline-calendar .fc-toolbar-title {
    font-weight: 700;
    font-size: 16px;
    color: #0f172a;
}

#timeline-calendar .fc-daygrid-day-frame {
    min-height: 120px; /* allow stacked items */
}

#timeline-calendar .fc-daygrid-day-top {
    padding: 8px 0 12px 0;
    color: #9ca3af;
    font-size: 12px;
}

.fc-custom-event {
    background: #eef2ff; /* light purple/blue pill */
    color: #0f172a;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    display: inline-block;
    margin-bottom: 8px;
    border: 1px solid rgba(15, 23, 42, 0.04);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Make the raw dayGrid event container transparent so our custom pill shows */
#timeline-calendar .fc-daygrid-event,
#timeline-calendar .fc-daygrid-event .fc-event-main {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
}

.event-tooltip {
    position: absolute;
    z-index: 2000;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(2, 6, 23, 0.12);
    padding: 12px 16px;
    min-width: 180px;
    font-size: 13px;
    color: #0f172a;
    border: 1px solid rgba(15, 23, 42, 0.04);
}

#timeline-calendar .fc-daygrid-day-number {
    color: #6b7280;
    font-weight: 600;
}

.fc-button {
    border-radius: 8px;
    border: 1px solid rgba(15, 23, 42, 0.06);
    background: #ffffff;
    color: #0f172a;
    padding: 6px 10px;
    box-shadow: none;
}

.fc-button-primary {
    background: #0f766e; /* teal accent similar to figma */
    color: #ffffff;
    border-color: #0f766e;
}

/* Small responsive tweaks */

@media (max-width: 768px) {
    #timeline-calendar .fc-daygrid-day-frame { min-height: 90px; }
    .fc-toolbar-chunk { flex-wrap: wrap; gap:8px; }
}