/* Task Validation System Styles */

.task-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: var(--bg-secondary, #1a2035);
    border-radius: 8px;
    margin-bottom: 0.75rem;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color, #2a3050);
}

[data-theme="light"] .task-item {
    background: #ffffff;
    border-color: #e5e5e5;
}

.task-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.task-item.completed {
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.4);
}

[data-theme="light"] .task-item.completed {
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.35);
}

.task-icon {
    font-size: 1.5rem;
}

.task-details {
    flex: 1;
}

.task-name {
    font-weight: 600;
    color: var(--text-primary, #e2e8f0);
    margin-bottom: 0.25rem;
}

.task-description {
    font-size: 0.875rem;
    color: var(--text-secondary, #94a3b8);
    margin-bottom: 0.25rem;
}

.task-meta {
    font-size: 0.875rem;
    color: #10b981;
    font-weight: 500;
}

.task-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.btn-task-action,
.btn-task-verify,
.btn-complete-task {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    white-space: nowrap;
}

.btn-task-action {
    background: #3b82f6;
    color: white;
}

.btn-task-action:hover:not(:disabled) {
    background: #2563eb;
}

.btn-task-verify {
    background: #f59e0b;
    color: white;
    min-width: 140px;
}

.btn-task-verify:hover:not(:disabled) {
    background: #d97706;
}

.btn-complete-task {
    background: #10b981;
    color: white;
}

.btn-complete-task:hover:not(:disabled) {
    background: #059669;
}

.btn-task-action:disabled,
.btn-task-verify:disabled,
.btn-complete-task:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.hidden {
    display: none !important;
}

.timer {
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.verify-text {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.completed-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 1rem;
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.875rem;
}

[data-theme="light"] .completed-badge {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
    border-color: rgba(16, 185, 129, 0.3);
}

.ext-verified-badge {
    display: inline-flex;
    align-items: center;
    margin-left: 0.35rem;
    color: #a78bfa;
    font-size: 0.8rem;
}
.ext-verified-badge i {
    filter: drop-shadow(0 0 3px rgba(167, 139, 250, 0.5));
}

/* Pending / Rejected states */
.task-item.task-pending {
    border-color: rgba(245, 158, 11, 0.5);
    background: rgba(245, 158, 11, 0.08);
}

.task-item.task-rejected {
    border-color: rgba(239, 68, 68, 0.5);
    background: rgba(239, 68, 68, 0.08);
}

.task-status {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.8rem;
    white-space: nowrap;
}

.task-status--pending {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.4);
}

.task-status--rejected {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.4);
}

.task-rejection-reason {
    display: block;
    font-size: 0.78rem;
    color: #ef4444;
    opacity: 0.85;
    margin-top: 0.15rem;
    font-style: italic;
}

/* Proof URL input */
.task-proof-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-top: 0.25rem;
}

.task-proof-input {
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    border: 1px solid var(--border-color, #374151);
    background: var(--bg-secondary, #1a2035);
    color: var(--text-primary, #e2e8f0);
    font-size: 0.8rem;
    width: 100%;
    min-width: 200px;
    outline: none;
    transition: border-color 0.2s;
}

.task-proof-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}


/* Responsive adjustments */
@media (max-width: 640px) {
    .task-item {
        flex-direction: column;
        align-items: center;
    }

    .task-icon {
        margin-bottom: 0.5rem;
    }

    .task-actions {
        width: 100%;
        margin-top: 0.75rem;
        flex-direction: column;
    }

    .btn-task-action,
    .btn-task-verify,
    .btn-complete-task {
        width: 100%;
    }
}