/**
 * DailyDone Plugin Styles
 */

/* General Styles */
.dailydone-parent-form,
.dailydone-child-form,
.dailydone-parent-dashboard,
.dailydone-child-dashboard {
    max-width: 800px;
    margin: 20px 0;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
    color: #333;
}

.form-group input[type="text"],
.form-group input[type="date"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    font-family: inherit;
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

.button {
    padding: 10px 20px;
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
    border: none;
    transition: background-color 0.3s;
}

.button-primary {
    background-color: #0073aa;
    color: white;
}

.button-primary:hover {
    background-color: #005a87;
}

.spinner {
    margin-left: 10px;
    vertical-align: middle;
}

#dailydone-message {
    margin-top: 20px;
    padding: 12px;
    border-radius: 4px;
}

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

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

/* Parent Form Styles */
.dailydone-parent-form h2 {
    color: #333;
    margin-bottom: 20px;
}

/* Child Form Styles */
.dailydone-child-form .date {
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
}

.tasks-list {
    margin-bottom: 20px;
}

.tasks-list h3 {
    margin-bottom: 15px;
    color: #333;
}

.task-item {
    margin-bottom: 10px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.task-item label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: normal;
}

.task-item input[type="checkbox"] {
    margin-right: 10px;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* Parent Dashboard Styles */
.children-overview {
    margin-bottom: 30px;
}

.children-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.child-card {
    padding: 20px;
    background-color: #f0f8ff;
    border-radius: 8px;
    text-align: center;
    border: 2px solid #e0e0e0;
}

.child-card h4 {
    margin: 0 0 10px 0;
    color: #333;
}

.child-card .coins {
    font-size: 18px;
    font-weight: bold;
    color: #0073aa;
}

.pending-submissions,
.recent-submissions {
    margin-bottom: 30px;
}

.submissions-list {
    margin-top: 15px;
}

.submission-item {
    margin-bottom: 20px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    border-left: 4px solid #ffc107;
}

.submission-item.pending {
    border-left-color: #ffc107;
}

.submission-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.submission-header h4 {
    margin: 0;
    color: #333;
}

.submission-header .date {
    color: #666;
    font-size: 14px;
}

.submission-content h5 {
    margin: 15px 0 10px 0;
    color: #333;
}

.tasks-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tasks-list li {
    padding: 8px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tasks-list li.completed {
    color: #28a745;
}

.tasks-list li.not-completed {
    color: #dc3545;
}

.tasks-list .status {
    font-weight: bold;
    font-size: 18px;
}

.notes {
    background-color: #fff;
    padding: 10px;
    border-radius: 4px;
    margin-top: 10px;
    font-style: italic;
}

.submission-actions {
    margin-top: 20px;
}

.feedback-input {
    margin-bottom: 10px;
}

.feedback-input textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.action-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

.reject-btn {
    background-color: #dc3545;
    color: white;
}

.reject-btn:hover {
    background-color: #c82333;
}

/* Submissions Table */
.submissions-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.submissions-table th,
.submissions-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.submissions-table th {
    background-color: #f8f9fa;
    font-weight: bold;
    color: #333;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
}

.status-badge.pending {
    background-color: #ffc107;
    color: #000;
}

.status-badge.approved {
    background-color: #28a745;
    color: #fff;
}

.status-badge.rejected {
    background-color: #dc3545;
    color: #fff;
}

/* Child Dashboard Styles */
.coin-balance-section {
    text-align: center;
    margin-bottom: 30px;
}

.coin-display {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 20px 40px;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    border-radius: 50px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.coin-icon {
    font-size: 48px;
}

.coin-count {
    font-size: 48px;
    font-weight: bold;
    color: #333;
}

.coin-label {
    font-size: 18px;
    color: #666;
}

.today-status {
    margin-bottom: 30px;
}

.status-card {
    padding: 20px;
    border-radius: 8px;
    margin-top: 15px;
}

.status-card.pending {
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
}

.status-card.approved {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
}

.status-card.rejected {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
}

.status-message {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    margin-bottom: 10px;
}

.status-message .icon {
    font-size: 24px;
}

.parent-feedback {
    margin-top: 10px;
    padding: 10px;
    background-color: rgba(255,255,255,0.5);
    border-radius: 4px;
}

.task-summary {
    margin-top: 10px;
    font-weight: bold;
}

.no-submission {
    text-align: center;
    padding: 30px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.no-submission .button {
    margin-top: 15px;
}

/* History List */
.history-list {
    margin-top: 15px;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    margin-bottom: 10px;
    background-color: #f8f9fa;
    border-radius: 4px;
    border-left: 4px solid #ddd;
}

.history-item.approved {
    border-left-color: #28a745;
}

.history-item.rejected {
    border-left-color: #dc3545;
}

.history-item.pending {
    border-left-color: #ffc107;
}

.history-date {
    font-weight: bold;
    color: #333;
}

.history-details {
    display: flex;
    align-items: center;
    gap: 15px;
}

.tasks-completed {
    color: #666;
}

.coin-earned {
    font-weight: bold;
    color: #28a745;
}

/* Coin History */
.coin-history {
    margin-top: 30px;
}

.coin-list {
    margin-top: 15px;
}

.coin-entry {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px;
    margin-bottom: 8px;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.coin-date {
    font-weight: bold;
    color: #666;
    min-width: 60px;
}

.coin-amount {
    font-weight: bold;
    color: #28a745;
    min-width: 50px;
}

.coin-reason {
    color: #333;
}

/* Responsive Design */
@media (max-width: 768px) {
    .dailydone-parent-form,
    .dailydone-child-form,
    .dailydone-parent-dashboard,
    .dailydone-child-dashboard {
        padding: 15px;
    }
    
    .children-grid {
        grid-template-columns: 1fr;
    }
    
    .coin-display {
        padding: 15px 25px;
    }
    
    .coin-icon,
    .coin-count {
        font-size: 36px;
    }
    
    .action-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .action-buttons .button {
        width: 100%;
    }
    
    .history-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .history-details {
        flex-wrap: wrap;
    }
}

/* Login Form */
.dailydone-login-wrapper {
    max-width: 400px;
    margin: 20px 0;
}

.dailydone-logged-in {
    padding: 15px;
    background-color: #f0f8ff;
    border-radius: 4px;
    text-align: center;
}

/* Coin Balance Header */
.dailydone-coin-balance-header {
    font-size: 20px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 20px;
    padding: 15px;
    background-color: #fffbf0;
    border-radius: 8px;
    border: 2px solid #ffd700;
}

/* Message Styles */
.dailydone-message {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    text-align: center;
    font-size: 16px;
}

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

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

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