/* ===============================
   Project Deadline & Importance
   =============================== */

/* Deadline Button on Cards */
.deadline-btn {
    background: transparent;
    border: none;
    color: inherit;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.deadline-btn:hover {
    background: var(--hover-bg);
    color: #ff9800;
}

/* Deadline Badge on Cards */
.deadline-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--surface);
    border-radius: 8px;
    margin-bottom: 12px;
    border-left: 4px solid #4CAF50;
    font-size: 12px;
    animation: slideInDown 0.3s ease;
}

.deadline-badge.deadline-soon {
    border-left-color: #FF9800;
    background: rgba(255, 152, 0, 0.05);
}

.deadline-badge.deadline-urgent {
    border-left-color: #FF5252;
    background: rgba(255, 82, 82, 0.05);
}

.deadline-badge.deadline-overdue {
    border-left-color: #D32F2F;
    background: rgba(211, 47, 47, 0.1);
    animation: pulse 1s infinite;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.deadline-importance {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    flex-shrink: 0;
}

.deadline-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.deadline-date {
    font-weight: 600;
    color: inherit;
}

.deadline-status {
    font-size: 11px;
    color: var(--text-secondary);
}

/* List Card Deadline Badge */
.list-card-deadline-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 4px;
    color: white;
    font-size: 11px;
    font-weight: 600;
    margin-left: 8px;
}

.list-card-title-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Modal Styles */
.deadline-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.deadline-modal {
    background: var(--surface);
    border-radius: 12px;
    padding: 24px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.deadline-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.deadline-modal-header h2 {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    word-break: break-word;
}

.deadline-modal-close {
    background: transparent;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.deadline-modal-close:hover {
    background: var(--hover-bg);
    color: inherit;
}

/* Form Group */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    color: var(--text);
    background: var(--input-bg, transparent);
    transition: all 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #ff9800;
    box-shadow: 0 0 0 3px rgba(255, 152, 0, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

/* Importance Level Selector */
.importance-selector {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.importance-option {
    padding: 12px;
    border: 2px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
    background: var(--surface);
}

.importance-option:hover {
    border-color: #ff9800;
}

.importance-option.selected {
    border-color: #ff9800;
    background: rgba(255, 152, 0, 0.1);
}

.importance-option input {
    display: none;
}

.importance-option-icon {
    font-size: 24px;
    margin-bottom: 6px;
}

.importance-option-label {
    font-weight: 600;
    font-size: 13px;
    display: block;
}

/* Deadline Info */
.deadline-info-box {
    background: var(--hover-bg);
    border-left: 4px solid #ff9800;
    padding: 12px;
    border-radius: 6px;
    margin-top: 16px;
    font-size: 13px;
    color: var(--text-secondary);
}

.deadline-info-box strong {
    color: var(--text);
}

/* Actions */
.deadline-modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.deadline-modal-actions button {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.btn-save {
    background: #ff9800;
    color: white;
}

.btn-save:hover {
    background: #f57c00;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.3);
}

.btn-cancel {
    background: var(--hover-bg);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-cancel:hover {
    background: var(--border);
}

.btn-delete {
    background: #f44336;
    color: white;
}

.btn-delete:hover {
    background: #d32f2f;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.3);
}

/* Current Deadline Display */
.current-deadline {
    background: var(--hover-bg);
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 16px;
    border-left: 4px solid #4CAF50;
    font-size: 13px;
}

.current-deadline-title {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.current-deadline-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
    color: var(--text-secondary);
}

.current-deadline-details span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.current-deadline-details i {
    font-size: 14px;
}

/* Dark Theme Support */
[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group select,
[data-theme="dark"] .form-group textarea {
    --input-bg: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .deadline-modal {
    background: #1e1e1e;
}

[data-theme="dark"] .importance-option {
    background: #2a2a2a;
}

/* Responsive */
@media (max-width: 768px) {
    .deadline-modal {
        width: 95%;
        padding: 20px;
    }

    .importance-selector {
        grid-template-columns: repeat(2, 1fr);
    }

    .deadline-badge {
        flex-wrap: wrap;
    }

    .deadline-modal-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .deadline-modal-header h2 {
        font-size: 16px;
    }

    .importance-selector {
        grid-template-columns: 1fr;
    }

    .list-card-title-wrapper {
        flex-direction: column;
        align-items: flex-start;
    }
}
