/* Trial Period Optimizer Specific Styles */

/* Timeline Visualization */
.timeline-visualization {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-radius: 12px;
    padding: 24px;
    margin: 20px 0;
    border: 1px solid #e2e8f0;
}

.timeline-container {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline-line {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #10b981, #3b82f6, #ef4444);
    border-radius: 2px;
    transform: translateY(-50%);
}

.timeline-points {
    display: flex;
    justify-content: space-between;
    position: relative;
    z-index: 2;
    padding: 0 20px;
}

.timeline-point {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: white;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    border: 3px solid #e2e8f0;
    justify-content: center;
    font-weight: 600;
    font-size: 12px;
    color: #64748b;
    transition: all 0.3s ease;
}

.timeline-point.active {
    border-color: #2563eb;
    background: #2563eb;
    color: white;
    transform: scale(1.1);
}

.timeline-point.completed {
    border-color: #10b981;
    background: #10b981;
    color: white;
}

.timeline-label {
    position: absolute;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    font-weight: 500;
    color: #374151;
    text-align: center;
    white-space: nowrap;
}

.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 8px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #f8fafc;
}

.checkbox-item:hover {
    border-color: #2563eb;
    background: #f1f5f9;
}

.checkbox-item input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid #cbd5e1;
    border-radius: 3px;
    position: relative;
    transition: all 0.2s ease;
}

.checkbox-item input[type="checkbox"]:checked + .checkmark {
    background: #2563eb;
    border-color: #2563eb;
}

.checkbox-item input[type="checkbox"]:checked + .checkmark::after {
    content: "✓";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.timeline-visualization {
    margin: 20px 0;
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.timeline-bar {
    height: 40px;
    background: #e2e8f0;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    margin-bottom: 16px;
}

.timeline-segment {
    height: 100%;
    position: absolute;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.segment-adaptation {
    background: linear-gradient(90deg, #f59e0b, #d97706);
}

.segment-evaluation {
    background: linear-gradient(90deg, #2563eb, #1d4ed8);
}

.segment-decision {
    background: linear-gradient(90deg, #10b981, #059669);
}

.segment-buffer {
    background: linear-gradient(90deg, #6b7280, #4b5563);
}

.timeline-legend {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #64748b;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

.testing-phases {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 24px 0;
}

.phase-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.2s ease;
}

.phase-card:hover {
    border-color: #2563eb;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
}

.phase-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.phase-icon {
    width: 32px;
    height: 32px;
    background: #2563eb;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.phase-title {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
}

.phase-duration {
    font-size: 12px;
    color: #64748b;
    background: #e2e8f0;
    padding: 2px 8px;
    border-radius: 12px;
}

.phase-description {
    color: #475569;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 12px;
}

.phase-tasks {
    list-style: none;
    padding: 0;
    margin: 0;
}

.phase-tasks li {
    color: #64748b;
    font-size: 13px;
    padding: 4px 0;
    position: relative;
    padding-left: 16px;
}

.phase-tasks li:before {
    content: "•";
    color: #2563eb;
    font-weight: bold;
    position: absolute;
    left: 0;
}

.evaluation-checklist {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 24px;
    margin: 24px 0;
}

.evaluation-checklist h4 {
    color: #1e293b;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.evaluation-checklist h4:before {
    content: "📋";
    font-size: 18px;
}

.checklist-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 12px;
}

.checklist-category {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 16px;
}

.checklist-category h5 {
    color: #374151;
    font-size: 14px;
    margin-bottom: 8px;
    font-weight: 600;
}

.checklist-category ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.checklist-category li {
    font-size: 13px;
    color: #64748b;
    padding: 3px 0;
    position: relative;
    padding-left: 20px;
}

.checklist-category li:before {
    content: "☐";
    position: absolute;
    left: 0;
    color: #94a3b8;
}

.decision-points {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 1px solid #f59e0b;
    border-radius: 8px;
    padding: 24px;
    margin: 24px 0;
}

.decision-points h4 {
    color: #92400e;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.decision-points h4:before {
    content: "⚠️";
    font-size: 18px;
}

.decision-timeline {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.decision-point {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 6px;
    border-left: 4px solid #f59e0b;
}

.decision-date {
    font-weight: 600;
    color: #92400e;
    min-width: 80px;
    font-size: 13px;
}

.decision-action {
    color: #78350f;
    font-size: 14px;
    flex: 1;
}

.trial-tips {
    space-y: 16px;
}

.tip-item {
    padding: 16px;
    background: #f1f5f9;
    border-radius: 6px;
    margin-bottom: 12px;
    border-left: 4px solid #2563eb;
}

.tip-item strong {
    color: #1e293b;
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
}

.tip-item p {
    color: #64748b;
    font-size: 13px;
    line-height: 1.4;
    margin: 0;
}

.trial-lengths {
    space-y: 12px;
}

.trial-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
}

.trial-duration {
    font-weight: 600;
    color: #2563eb;
    font-size: 14px;
}

.trial-description {
    color: #64748b;
    font-size: 13px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .checkbox-group {
        grid-template-columns: 1fr;
    }
    
    .testing-phases {
        grid-template-columns: 1fr;
    }
    
    .checklist-items {
        grid-template-columns: 1fr;
    }
    
    .timeline-legend {
        justify-content: flex-start;
    }
    
    .decision-point {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .decision-date {
        min-width: auto;
    }
}

/* Animation for timeline */
@keyframes timelineGrow {
    from {
        width: 0;
    }
    to {
        width: var(--segment-width);
    }
}

.timeline-segment.animate {
    animation: timelineGrow 1s ease-out forwards;
}

/* Print styles */
@media print {
    .testing-phases,
    .evaluation-checklist,
    .decision-points {
        break-inside: avoid;
    }
    
    .phase-card {
        border: 1px solid #000;
        margin-bottom: 20px;
    }
}
