/* BackwardTimeCalculator.css - Calculator-specific styles only */
/* DO NOT redefine global classes: .glass-card, .form-input, .btn-custom, .btn-sponsor */
/* Global classes defined in layout.css */

/* ========== Task List Styles ========== */
.task-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.task-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 10px;
    border: 1px solid rgba(102, 126, 234, 0.2);
    transition: all 0.3s ease;
}

.task-item:hover {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(102, 126, 234, 0.4);
}

.task-item .task-drag-handle {
    cursor: grab;
    color: #94a3b8;
    padding: 5px;
}

.task-item .task-drag-handle:active {
    cursor: grabbing;
}

.task-item .task-name-input {
    flex: 1;
    min-width: 0;
}

.task-item .task-duration-input {
    width: 80px;
    text-align: center;
}

.task-item .task-duration-unit {
    color: #64748b;
    font-size: 0.85rem;
    white-space: nowrap;
}

.task-item .btn-remove-task {
    background: none;
    border: none;
    color: #e53e3e;
    cursor: pointer;
    padding: 5px 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.task-item .btn-remove-task:hover {
    background: rgba(229, 62, 62, 0.1);
}

.task-empty-state {
    text-align: center;
    padding: 30px;
    color: #94a3b8;
    font-style: italic;
}

/* ========== Add Task Button ========== */
.btn-add-task {
    width: 100%;
    padding: 12px;
    margin-top: 10px;
    border: 2px dashed #48bb78;
    background: rgba(72, 187, 120, 0.05);
    color: #48bb78;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 500;
}

.btn-add-task:hover {
    background: rgba(72, 187, 120, 0.1);
    border-color: #38a169;
}

/* ========== Quick Templates ========== */
.template-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
}

.btn-template {
    padding: 8px 16px;
    border: 1px solid rgba(102, 126, 234, 0.3);
    background: rgba(102, 126, 234, 0.05);
    color: #667eea;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.btn-template:hover {
    background: rgba(102, 126, 234, 0.1);
    border-color: #667eea;
}

.btn-template i {
    margin-right: 5px;
}

/* ========== Result Display ========== */
.result-main {
    text-align: center;
    padding: 25px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: 15px;
    margin-bottom: 20px;
}

.result-main-time {
    font-size: 3.5rem;
    font-weight: 700;
    font-family: 'Roboto Mono', monospace;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.result-main-label {
    font-size: 1rem;
    color: #64748b;
    margin-top: 5px;
}

.result-previous-day {
    display: inline-block;
    padding: 4px 12px;
    background: #f59e0b;
    color: white;
    border-radius: 15px;
    font-size: 0.85rem;
    margin-top: 10px;
    font-weight: 500;
}

.result-total-time {
    text-align: center;
    padding: 15px;
    background: rgba(72, 187, 120, 0.1);
    border-radius: 10px;
    margin-bottom: 15px;
}

.result-total-time .value {
    font-size: 1.5rem;
    font-weight: 600;
    color: #48bb78;
}

.result-total-time .label {
    font-size: 0.9rem;
    color: #64748b;
}

/* ========== Status Message ========== */
.status-message {
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    font-weight: 500;
    margin-bottom: 15px;
}

.status-plenty {
    background: rgba(72, 187, 120, 0.1);
    color: #48bb78;
    border: 1px solid rgba(72, 187, 120, 0.3);
}

.status-ok {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    border: 1px solid rgba(102, 126, 234, 0.3);
}

.status-tight {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.status-urgent {
    background: rgba(229, 62, 62, 0.1);
    color: #e53e3e;
    border: 1px solid rgba(229, 62, 62, 0.3);
}

/* ========== Timeline ========== */
.timeline-container {
    position: relative;
    padding: 20px 0 20px 30px;
}

.timeline-line {
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, #48bb78 0%, #667eea 50%, #764ba2 100%);
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    padding: 15px 0;
    padding-left: 25px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -25px;
    top: 50%;
    transform: translateY(-50%);
    width: 15px;
    height: 15px;
    background: white;
    border: 3px solid #667eea;
    border-radius: 50%;
    z-index: 1;
}

.timeline-item.timeline-start::before {
    background: #48bb78;
    border-color: #48bb78;
}

.timeline-item.timeline-end::before {
    background: #764ba2;
    border-color: #764ba2;
}

.timeline-item-content {
    background: rgba(255, 255, 255, 0.8);
    padding: 12px 15px;
    border-radius: 10px;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.timeline-item-time {
    font-size: 1.1rem;
    font-weight: 600;
    font-family: 'Roboto Mono', monospace;
    color: #667eea;
}

.timeline-item-name {
    font-size: 0.95rem;
    color: #334155;
    margin-top: 3px;
}

.timeline-item-duration {
    font-size: 0.8rem;
    color: #94a3b8;
    margin-top: 2px;
}

.timeline-item.timeline-start .timeline-item-time,
.timeline-item.timeline-start .timeline-item-name {
    color: #48bb78;
}

.timeline-item.timeline-end .timeline-item-time,
.timeline-item.timeline-end .timeline-item-name {
    color: #764ba2;
}

/* ========== Input Label with Tooltip ========== */
.input-label-with-tooltip {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.input-label-with-tooltip .tooltip-icon {
    width: 18px;
    height: 18px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: #667eea;
    cursor: help;
    position: relative;
}

.input-label-with-tooltip .tooltip-icon:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #334155;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    white-space: nowrap;
    z-index: 100;
    margin-bottom: 5px;
}

/* ========== Responsive Design ========== */
@media (max-width: 767px) {
    .task-item {
        flex-wrap: wrap;
    }

    .task-item .task-name-input {
        width: 100%;
        order: 1;
    }

    .task-item .task-duration-input {
        width: 70px;
        order: 2;
    }

    .task-item .task-duration-unit {
        order: 3;
    }

    .task-item .btn-remove-task {
        order: 4;
        margin-left: auto;
    }

    .task-item .task-drag-handle {
        display: none;
    }

    .result-main-time {
        font-size: 2.5rem;
    }

    .template-buttons {
        justify-content: center;
    }

    .btn-template {
        flex: 1 1 calc(50% - 8px);
        text-align: center;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .result-main-time {
        font-size: 3rem;
    }
}
