/* Schedule Boost Styles - Compact & Minimalist Design */
/* Compatible with Redmine 5.1+ and 6.x */

.schedule-boost {
    margin: 16px 0;
    padding: 0;
    background: transparent;
    clear: both;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.schedule-period {
    margin-bottom: 20px;
}

.schedule-period-header {
    color: black;
    padding: 6px 14px;
    margin: 0 0 10px 0;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.15);
}

.schedule-period-header::before {
    content: '📅';
    font-size: 14px;
}

/* Grid Format - Compact Cards */
.schedule-boost-grid .schedule-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 10px;
}

.schedule-item {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 10px 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
    position: relative;
    font-size: 13px;
}

.schedule-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: #667eea;
}

.schedule-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
    border-radius: 6px 0 0 6px;
}

.schedule-item.parent-issue {
    background: #fafbff;
    border-color: #667eea;
    font-weight: 500;
}

.schedule-item.child-issue::before {
    background: #cbd5e1;
}

.issue-header {
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: 1.3;
}

.issue-parent-ref {
    font-size: 11px;
    color: #94a3b8;
    margin-bottom: 6px;
    padding: 4px 8px;
    background: #f1f5f9;
    border-radius: 4px;
    display: inline-block;
}

.issue-parent-ref a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.issue-parent-ref a:hover {
    text-decoration: underline;
}

.issue-id {
    font-weight: 600;
    color: #667eea;
    text-decoration: none;
    font-size: 11px;
    padding: 2px 6px;
    background: #e0e7ff;
    border-radius: 4px;
    white-space: nowrap;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.issue-id:hover {
    background: #667eea;
    color: white;
}

.issue-subject {
    color: #1e293b;
    font-size: 13px;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.issue-details {
    font-size: 11px;
    color: #64748b;
    margin-top: 6px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.issue-details span {
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 500;
}

.issue-tracker {
    background: #e0e7ff;
    color: #4338ca;
}

.issue-status {
    background: #dbeafe;
    color: #1e40af;
}

.issue-priority {
    background: #fef3c7;
    color: #92400e;
}

.issue-progress {
}

.issue-assigned {
    background: #fef3c7;
    color: #92400e;
}

.issue-date {
    background: #f3e8ff;
    color: #6b21a8;
    font-size: 10px;
}

.issue-version {
    background: #ddd6fe;
    color: #5b21b6;
}

.issue-category {
    background: #fce7f3;
    color: #9f1239;
}

.issue-hours {
    background: #ccfbf1;
    color: #134e4a;
    font-size: 10px;
}

/* List Format - Compact Lines */
.schedule-boost-list .schedule-items-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.schedule-boost-list li {
    padding: 8px 12px;
    margin: 0;
    background: white;
    border: 1px solid #e2e8f0;
    border-left: 3px solid #667eea;
    border-radius: 4px;
    font-size: 13px;
    line-height: 1.4;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.schedule-boost-list li:hover {
    background: #fafbff;
    border-left-width: 4px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.schedule-boost-list li.parent-issue {
    background: #fafbff;
    font-weight: 500;
}

.schedule-boost-list li.child-issue {
    margin-left: 20px;
    border-left-color: #cbd5e1;
}

.schedule-boost-list li a {
    font-weight: 600;
    color: #667eea;
    text-decoration: none;
    padding: 2px 6px;
    background: #e0e7ff;
    border-radius: 3px;
    font-size: 11px;
    transition: all 0.2s ease;
}

.schedule-boost-list li a:hover {
    background: #667eea;
    color: white;
}

.schedule-boost-list li span {
    font-size: 13px;
}

.schedule-boost-list .tracker {
    padding: 2px 6px;
    background: #e0e7ff;
    color: #4338ca;
    border-radius: 3px;
    font-weight: 500;
    font-size: 11px;
}

.schedule-boost-list .status {
    padding: 2px 6px;
    background: #dbeafe;
    color: #1e40af;
    border-radius: 3px;
    font-weight: 500;
    font-size: 11px;
}

.schedule-boost-list .priority {
    padding: 2px 6px;
    background: #fef3c7;
    color: #92400e;
    border-radius: 3px;
    font-weight: 500;
    font-size: 11px;
}

.schedule-boost-list .progress {
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 600;
    font-size: 11px;
}

.schedule-boost-list .assigned,
.schedule-boost-list .date,
.schedule-boost-list .version,
.schedule-boost-list .hours {
    padding: 2px 6px;
    background: #f1f5f9;
    color: #475569;
    border-radius: 3px;
    font-size: 11px;
}

/* Table Format - Compact & Condensed */
.schedule-boost-table {
    overflow-x: auto;
    background: white;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.schedule-boost-table table thead tr th{
    text-align: center !important;
}
.schedule-boost-table table {
    width: 100%;
    background: white;
    border-collapse: collapse;
    font-size: 13px;
}

.schedule-boost-table th {
    background: linear-gradient(135deg, #acacac 0%, #8e8894 100%);
    color: white !important;
    padding: 8px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    text_align: center !important
}

.schedule-boost-table tbody tr {
    transition: background 0.15s ease;
    border-bottom: 1px solid #f1f5f9;
}

.schedule-boost-table tbody tr:hover {
    background: #fafbff !important;
}

.schedule-boost-table tbody tr:last-child {
    border-bottom: none;
}

.schedule-boost-table tr.parent-issue {
    font-weight: 500;
    background: #fafbff;
}

.schedule-boost-table tr.child-issue {
    background: white;
}

.schedule-boost-table tr.child-issue td:first-child {
    padding-left: 30px;
    position: relative;
}

.schedule-boost-table tr.child-issue td:first-child::before {
    content: '└';
    position: absolute;
    left: 15px;
    color: #cbd5e1;
}

.schedule-boost-table td {
    padding: 8px 12px;
    color: #858585;
}


.schedule-boost-table a:hover {
    background: #667eea;
    color: white;
}

/* Empty State */
.schedule-boost-empty {
    padding: 30px 20px;
    text-align: center;
    background: #fafbff;
    border-radius: 6px;
    border: 1px dashed #cbd5e1;
    color: #64748b;
    font-size: 13px;
}

/* Warning Messages */
.warning {
    background: #fef3c7;
    border: 1px solid #fbbf24;
    color: #92400e;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13px;
}

.warning strong {
    color: #78350f;
}

/* Error Messages */
.error {
    background: #fee2e2;
    border: 1px solid #f87171;
    color: #991b1b;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13px;
}

.error strong {
    color: #7f1d1d;
}

/* Responsive Design */
@media (max-width: 768px) {
    .schedule-boost-grid .schedule-items {
        grid-template-columns: 1fr;
    }

    .schedule-period-header {
        font-size: 12px;
        padding: 5px 10px;
    }

    .schedule-item {
        padding: 8px 10px;
    }

    .schedule-boost-list li.child-issue {
        margin-left: 12px;
    }

    .schedule-boost-table th,
    .schedule-boost-table td {
        padding: 6px 10px;
        font-size: 12px;
    }
    .schedule-boost-table th{
        text_align: center !important
    }
}

/* Print styles */
@media print {
    .schedule-item,
    .schedule-boost-list li {
        break-inside: avoid;
    }

    .schedule-period {
        break-inside: avoid;
    }
}

/* Smooth fade-in animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.schedule-item,
.schedule-boost-list li {
    animation: fadeIn 0.3s ease-out backwards;
}

.schedule-item:nth-child(n) {
    animation-delay: calc(0.03s * (var(--item-index, 1)));
}

/*.progress{*/
/*    display: flex;*/
/*    align-items: center;*/
/*}*/
span.sp-inline-progress-bar {
    display: inline-block;
    height: 16px;
    left: 1px;
    text-align: center;
}
span.sp-inline-progress-bar.total {
    background-color: rgba(209,211,224,.5);
    border-radius: 6px;
    position: relative;
    vertical-align: text-bottom;
    width: 100px;
}
span.sp-inline-progress-bar {
    display: inline-block;
    height: 4px;
}
span.sp-inline-progress-bar.done {
    background-color: #029934;
    border-top-left-radius: 6px;
    border-bottom-left-radius: 6px;
    position: absolute;
    left: 0px;
    top: 0px;
}
span.sp-inline-progress-bar.done.completed {
    border-top-right-radius: 6px;
    border-bottom-right-radius: 6px;
}
span.inline-priority::before {
    content: ' ';
    display: inline-block;
    height: 14px;
    width: 14px;
    margin-bottom: -2px;
}
span.inline-priority.default::before {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14'%3e%3cpath fill='%230065FF' d='M11.5 6h-9a1 1 0 110-2h9a1 1 0 110 2zm0 4h-9a1 1 0 110-2h9a1 1 0 110 2z'/%3e%3c/svg%3e");
}
span.inline-priority.high2::before {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14'%3e%3cpath fill='%23E5123D' d='M11.707 5.293l-4-4a.999.999 0 00-1.414 0l-4 4a.999.999 0 101.414 1.414L6 4.414V12a1 1 0 102 0V4.414l2.293 2.293a.997.997 0 001.414 0 .999.999 0 000-1.414z'/%3e%3c/svg%3e");
}
span.inline-priority.high3::before {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14'%3e%3cg fill='%23F14F28'%3e%3cpath d='M10.999 7a.994.994 0 01-.599-.2L7 4.25 3.6 6.8a1 1 0 01-1.2-1.6l4-3a.995.995 0 011.199 0l4 3a.998.998 0 01.2 1.399.992.992 0 01-.8.401z'/%3e%3cpath opacity='.7' d='M10.999 12a.994.994 0 01-.599-.2L7 9.25 3.6 11.8a1 1 0 01-1.2-1.599l4-3a.995.995 0 011.199 0l4 3a.998.998 0 01-.6 1.799z'/%3e%3c/g%3e%3c/svg%3e");
}
span.inline-priority.high4::before {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14'%3e%3cpath fill='%23FC8C12' d='M10.999 9.5a.996.996 0 01-.599-.2L7 6.75 3.6 9.3a1 1 0 01-1.2-1.6l4-3a.996.996 0 011.2 0l4 3a.999.999 0 01-.601 1.8z'/%3e%3c/svg%3e");
}
span.inline-priority.high5::before {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14'%3e%3cpath fill='%23614BA6' d='M10.999 9.5a.996.996 0 01-.599-.2L7 6.75 3.6 9.3a1 1 0 01-1.2-1.6l4-3a.996.996 0 011.2 0l4 3a.999.999 0 01-.601 1.8z'/%3e%3c/svg%3e");
}
span.inline-priority.highest::before {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14'%3e%3cpath fill='%23BC092E' d='M11.6 4.2l-4-3a.999.999 0 00-1.2 0l-4 3A1 1 0 002 5v7a1.001 1.001 0 001.6.8L7 10.25l3.4 2.55a.995.995 0 001.047.095c.339-.17.553-.516.553-.895V5a1 1 0 00-.4-.8z'/%3e%3c/svg%3e");
}
span.inline-priority.low2::before {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14'%3e%3cg fill='%2301A671'%3e%3cpath d='M7 12a.995.995 0 01-.6-.2l-4-3a1 1 0 011.2-1.6L7 9.75l3.4-2.55a1 1 0 011.2 1.599l-4 3A.99.99 0 017 12z'/%3e%3cpath opacity='.7' d='M7 7a.995.995 0 01-.6-.2l-4-3a1 1 0 011.2-1.6L7 4.75l3.4-2.55a1 1 0 011.2 1.599l-4 3A.99.99 0 017 7z'/%3e%3c/g%3e%3c/svg%3e");
}
span.inline-priority.low3::before {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14'%3e%3cpath fill='%2300B3AD' d='M7 9.5a.995.995 0 01-.6-.2l-4-3a1 1 0 011.2-1.6L7 7.25l3.4-2.55a1 1 0 011.2 1.599l-4 3A.99.99 0 017 9.5z'/%3e%3c/svg%3e");
}
span.inline-priority.lowest::before {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14'%3e%3cpath fill='%23029934' d='M11.707 7.293a.999.999 0 00-1.414 0L8 9.586V2a1 1 0 10-2 0v7.586L3.707 7.293a.999.999 0 10-1.414 1.414l4 4a.997.997 0 001.414 0l4-4a.999.999 0 000-1.414z'/%3e%3c/svg%3e");
}
.inline-context-menu:hover {
    text-decoration: none;
    cursor: pointer;
}
.inline-context-menu.icon-actions::before {
    font: normal normal normal 14px/1 FontAwesome;
    margin-left: 5px;
    position: relative;
    top: 4px;
}
