/* General page styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f4f7f6;
    color: #333;
    line-height: 1.6;
}

.gantt-maker-container {
    max-width: 80%;
    margin: 2rem auto;
    padding: 2rem;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

header h1, section h2 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 1rem;
}

/* Table styling */
#activity-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

#activity-table th, #activity-table td {
    padding: 12px 15px;
    border: 1px solid #ddd;
    text-align: left;
}

#activity-table thead {
    background-color: #e9ecef;
    font-weight: bold;
}

#activity-table td[contenteditable="true"] {
    background-color: #fff;
    transition: background-color 0.2s ease-in-out;
}

#activity-table td[contenteditable="true"]:focus {
    background-color: #e8f0fe;
    outline: 2px solid #4a90e2;
}

/* Specifically target the duration column for number alignment */
#activity-table td:nth-child(4) {
    text-align: right;
}

/* Controls and buttons */
.table-controls {
    text-align: right;
    margin-bottom: 2rem;
}

button {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: background-color 0.2s, transform 0.1s;
}

button:active {
    transform: translateY(1px);
}

#add-row-btn {
    background-color: #f0f0f0;
    color: #333;
    border: 1px solid #ccc;
}

#add-row-btn:hover {
    background-color: #e0e0e0;
}

.remove-row-btn {
    background-color: #fbebeb;
    color: #c0392b;
    padding: 5px 10px;
    font-size: 0.8rem;
}

.remove-row-btn:hover {
    background-color: #e74c3c;
    color: #fff;
}

#generate-chart-btn {
    display: block;
    width: 100%;
    padding: 15px;
    background-color: #27ae60;
    color: white;
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

#generate-chart-btn:hover {
    background-color: #2ecc71;
}

/* Gantt Chart Output Area */
#gantt-chart-container {
    width: 100%;
    /* Styles for the chart itself will be added by JavaScript */
    overflow-x: auto; /* Allows horizontal scrolling if chart is wide */
}

/* Add these styles for interactivity */
.task-bar.draggable {
    cursor: grab;
}

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

.task-bar.dragging {
    opacity: 0.7;
    z-index: 1000; /* Ensures the bar is on top while dragging */
}

/* Add these styles for the new example buttons */
#examples-section {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #ddd;
}

.example-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.example-btn {
    background-color: #f8f9fa;
    color: #495057;
    border: 1px solid #dee2e6;
}

.example-btn:hover {
    background-color: #e9ecef;
}

/* Add these styles for the random button */
#load-random-btn {
    background-color: #e8f0fe;
    border-color: #4a90e2;
    color: #4a90e2;
}

#load-random-btn:hover {
    background-color: #dbe8fe;
    color: #2c6ac2;
}