/**
 * Sveikatos Iššūkiai - Public Styles
 * Author: Tobalt — https://tobalt.lt
 */

/* General Styles */
.tobalt-challenges-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin: 30px 0;
}

.tobalt-challenge-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.tobalt-challenge-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.tobalt-challenge-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.tobalt-challenge-content {
    padding: 20px;
}

.tobalt-challenge-content h3 {
    margin: 0 0 15px 0;
    font-size: 22px;
    color: #333;
}

.tobalt-challenge-category {
    margin-bottom: 10px;
}

.tobalt-badge {
    display: inline-block;
    padding: 4px 12px;
    background: #f0f0f0;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: #666;
}

.tobalt-challenge-excerpt {
    margin: 15px 0;
    color: #666;
    line-height: 1.6;
}

.tobalt-challenge-meta {
    display: flex;
    gap: 20px;
    margin: 15px 0;
    padding: 15px 0;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
}

.tobalt-meta-item {
    font-size: 14px;
    color: #666;
}

.tobalt-challenge-actions {
    margin-top: 15px;
}

/* Buttons */
.tobalt-btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.tobalt-btn-primary {
    background: #0073aa;
    color: #fff;
}

.tobalt-btn-primary:hover {
    background: #005a87;
    color: #fff;
}

.tobalt-btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.tobalt-btn-secondary:hover {
    background: #e0e0e0;
}

.tobalt-btn-large {
    padding: 15px 30px;
    font-size: 18px;
    width: 100%;
}

/* Forms */
.tobalt-form {
    max-width: 600px;
    margin: 20px 0;
}

.tobalt-form-row {
    margin-bottom: 20px;
}

.tobalt-form-row label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.tobalt-form-row label .required {
    color: #d63638;
}

.tobalt-form-row input[type="text"],
.tobalt-form-row input[type="email"],
.tobalt-form-row input[type="password"],
.tobalt-form-row input[type="file"],
.tobalt-form-row textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    font-family: inherit;
}

.tobalt-form-row textarea {
    resize: vertical;
    min-height: 100px;
}

.tobalt-form-row small {
    display: block;
    margin-top: 5px;
    font-size: 14px;
    color: #666;
}

.tobalt-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
}

.tobalt-checkbox-label input[type="checkbox"] {
    margin-top: 3px;
}

.tobalt-honesty-check {
    padding: 15px;
    background: #f9f9f9;
    border: 2px solid #0073aa;
    border-radius: 6px;
}

/* Task Interface */
.tobalt-task-interface {
    max-width: 800px;
    margin: 30px auto;
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.tobalt-task-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #0073aa;
}

.tobalt-task-header h2 {
    margin: 0 0 10px 0;
    color: #0073aa;
}

.tobalt-day-badge {
    display: inline-block;
    padding: 6px 15px;
    background: #0073aa;
    color: #fff;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

.tobalt-task-content h3 {
    margin: 0 0 20px 0;
    font-size: 26px;
    color: #333;
}

.tobalt-task-description {
    margin: 20px 0;
    padding: 20px;
    background: #f9f9f9;
    border-left: 4px solid #0073aa;
    line-height: 1.6;
}

/* Messages */
.tobalt-success-message,
.tobalt-pending-message,
.tobalt-rejection-message,
.tobalt-completion-message {
    padding: 20px;
    margin: 20px 0;
    border-radius: 6px;
}

.tobalt-success-message {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.tobalt-pending-message {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

.tobalt-rejection-message {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.tobalt-completion-message {
    text-align: center;
    padding: 40px;
}

.tobalt-scientific-message {
    margin: 30px 0;
    padding: 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 8px;
}

.tobalt-scientific-message h4 {
    margin: 0 0 15px 0;
    font-size: 20px;
}

.tobalt-scientific-message p {
    margin: 0 0 10px 0;
    line-height: 1.6;
}

.tobalt-source {
    font-size: 14px;
    opacity: 0.9;
}

/* Submission Preview */
.tobalt-submission-preview {
    margin: 20px 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 6px;
}

.tobalt-submitted-photo img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin-bottom: 15px;
}

.tobalt-submitted-description {
    margin-top: 15px;
}

/* Progress Tracker */
.tobalt-progress-tracker {
    max-width: 900px;
    margin: 30px auto;
}

.tobalt-progress-tracker h3 {
    text-align: center;
    font-size: 28px;
    margin-bottom: 30px;
    color: #333;
}

.tobalt-progress-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.tobalt-stat {
    text-align: center;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.tobalt-stat-value {
    font-size: 32px;
    font-weight: bold;
    color: #0073aa;
    margin-bottom: 5px;
}

.tobalt-stat-label {
    font-size: 14px;
    color: #666;
}

.tobalt-progress-bar {
    height: 30px;
    background: #e0e0e0;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 30px;
}

.tobalt-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #0073aa, #00a0d2);
    transition: width 0.5s ease;
}

.tobalt-tasks-calendar {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.tobalt-task-day {
    padding: 15px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s;
}

.tobalt-task-day-number {
    font-size: 18px;
    font-weight: bold;
    color: #0073aa;
    margin-bottom: 8px;
}

.tobalt-task-day-title {
    font-size: 14px;
    color: #333;
    margin-bottom: 8px;
}

.tobalt-task-day-status {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.tobalt-task-day.completed {
    background: #d4edda;
    border-color: #28a745;
}

.tobalt-task-day.completed .tobalt-task-day-status {
    color: #155724;
}

.tobalt-task-day.pending {
    background: #fff3cd;
    border-color: #ffc107;
}

.tobalt-task-day.pending .tobalt-task-day-status {
    color: #856404;
}

.tobalt-task-day.rejected {
    background: #f8d7da;
    border-color: #dc3545;
}

.tobalt-task-day.rejected .tobalt-task-day-status {
    color: #721c24;
}

.tobalt-task-day.locked {
    opacity: 0.5;
}

.tobalt-task-day.pending-action {
    border-color: #0073aa;
}

/* Registration */
.tobalt-registration-form {
    max-width: 600px;
    margin: 30px auto;
}

.tobalt-challenge-info {
    padding: 20px;
    background: #f9f9f9;
    border-radius: 6px;
    margin-bottom: 30px;
}

/* Responsive */
@media (max-width: 768px) {
    .tobalt-challenges-list {
        grid-template-columns: 1fr;
    }

    .tobalt-progress-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .tobalt-tasks-calendar {
        grid-template-columns: 1fr;
    }

    .tobalt-task-interface {
        padding: 20px;
    }
}

/* Loading State */
.tobalt-loading {
    text-align: center;
    padding: 20px;
}

.tobalt-loading::after {
    content: "...";
    animation: tobalt-dots 1.5s steps(4, end) infinite;
}

@keyframes tobalt-dots {
    0%, 20% { content: ""; }
    40% { content: "."; }
    60% { content: ".."; }
    80%, 100% { content: "..."; }
}

/* Error/Success Messages */
#tobalt-registration-message,
#tobalt-enroll-message,
#tobalt-submission-message {
    margin-top: 15px;
    padding: 15px;
    border-radius: 6px;
    display: none;
}

#tobalt-registration-message.success,
#tobalt-enroll-message.success,
#tobalt-submission-message.success {
    display: block;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

#tobalt-registration-message.error,
#tobalt-enroll-message.error,
#tobalt-submission-message.error {
    display: block;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}
