/* WP Task Manager Frontend Styles */

.wptm-task-manager {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Login Required */
.wptm-login-required {
    text-align: center;
    padding: 40px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.wptm-login-required p {
    margin-bottom: 20px;
    font-size: 16px;
    color: #6c757d;
}

/* User Statistics */
.wptm-user-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    color: white;
}

.wptm-stat-item {
    text-align: center;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.wptm-stat-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    opacity: 0.9;
}

.wptm-stat-value {
    display: block;
    font-size: 24px;
    font-weight: bold;
}

/* Task Filters */
.wptm-task-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.wptm-filter-btn {
    padding: 10px 20px;
    border: 2px solid #e9ecef;
    background: white;
    color: #495057;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.wptm-filter-btn:hover {
    border-color: #007cba;
    color: #007cba;
}

.wptm-filter-btn.active {
    background: #007cba;
    border-color: #007cba;
    color: white;
}

/* Task Sections */
.wptm-task-section {
    margin-bottom: 40px;
}

.wptm-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #212529;
}

.wptm-section-title .dashicons {
    font-size: 24px;
    color: #007cba;
}

.wptm-section-description {
    color: #6c757d;
    margin-bottom: 25px;
    font-size: 16px;
}

/* Tasks Grid */
.wptm-tasks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

/* Task Cards */
.wptm-task-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.wptm-task-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.wptm-task-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #007cba, #00a0d2);
}

/* Task Header */
.wptm-task-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.wptm-task-title {
    font-size: 18px;
    font-weight: 600;
    color: #212529;
    margin: 0;
    flex: 1;
    line-height: 1.3;
}

.wptm-task-points {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    margin-left: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.wptm-task-points::before {
    content: "🎁";
    font-size: 16px;
}

/* Task Description */
.wptm-task-description {
    color: #6c757d;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 20px;
}

/* Task Footer */
.wptm-task-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.wptm-task-status {
    flex: 1;
}

.wptm-status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wptm-status-not_started {
    background: #e9ecef;
    color: #6c757d;
}

.wptm-status-pending {
    background: #fff3cd;
    color: #856404;
}

.wptm-status-completed {
    background: #d4edda;
    color: #155724;
}

.wptm-task-actions {
    margin-left: 15px;
}

/* Buttons */
.wptm-button {
    background: #007cba;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.wptm-button:hover {
    background: #005a87;
    color: white;
    text-decoration: none;
}

.wptm-button:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

/* Completed Icon */
.wptm-completed-icon {
    display: inline-block;
    width: 32px;
    height: 32px;
    background: #28a745;
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 32px;
    font-weight: bold;
}

.wptm-auto-complete-notice {
    display: inline-block;
    padding: 8px 16px;
    background: #e3f2fd;
    color: #1976d2;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid #bbdefb;
}

/* No Tasks */
.wptm-no-tasks {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #dee2e6;
}

.wptm-no-tasks p {
    color: #6c757d;
    font-size: 16px;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .wptm-task-manager {
        padding: 15px;
    }
    
    .wptm-user-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        padding: 15px;
    }
    
    .wptm-tasks-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .wptm-task-filters {
        justify-content: center;
    }
    
    .wptm-task-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .wptm-task-actions {
        margin-left: 0;
        width: 100%;
    }
    
    .wptm-button {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .wptm-user-stats {
        grid-template-columns: 1fr;
    }
    
    .wptm-task-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .wptm-task-points {
        margin-left: 0;
    }
}

/* Animation for task completion */
@keyframes taskComplete {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.wptm-task-card.completed {
    animation: taskComplete 0.5s ease;
}

/* Loading state */
.wptm-loading {
    opacity: 0.6;
    pointer-events: none;
}

.wptm-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
} 