/**
 * Client styles for Site Maintenance Reporter
 */

/* Dashboard Widget Styling */
.smr-client-widget {
    padding: 10px 0;
}

.smr-status-header {
    text-align: center;
    margin-bottom: 15px;
    padding: 15px;
    background: linear-gradient(135deg, #f7fff7 0%, #e8f5e8 100%);
    border: 1px solid #46b450;
    border-radius: 6px;
}

.smr-status-title {
    margin: 0 0 5px 0;
    font-size: 16px;
    font-weight: 600;
    color: #46b450;
}

.smr-last-maintenance {
    margin: 0;
    color: #666;
    font-size: 13px;
}

/* Activity Card */
.smr-activity-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
    font-size: 13px;
    line-height: 1.4;
    color: #555;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* Widget Actions */
.smr-widget-actions {
    margin-top: 15px;
}

.smr-action-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.smr-action-buttons .button {
    flex: 1;
    min-width: 120px;
    text-align: center;
    padding: 6px 12px;
    font-size: 12px;
    line-height: 1.4;
}

.smr-action-buttons .button .dashicons {
    margin-right: 4px;
    font-size: 14px;
    vertical-align: text-top;
}

.smr-download-pdf {
    background: #46b450 !important;
    border-color: #46b450 !important;
    color: #fff !important;
}

.smr-download-pdf:hover {
    background: #3ba93f !important;
    border-color: #3ba93f !important;
}

/* Full Report Section */
.smr-full-report {
    margin-top: 15px;
    border-top: 1px solid #ddd;
    padding-top: 15px;
}

.smr-full-report h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    font-weight: 600;
    color: #23282d;
}

.smr-activities-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.smr-activity-item {
    display: flex;
    padding: 8px 12px;
    border-bottom: 1px solid #eee;
    font-size: 12px;
    line-height: 1.4;
}

.smr-activity-item:last-child {
    border-bottom: none;
}

.smr-activity-item:nth-child(even) {
    background: #f9f9f9;
}

.smr-activity-date {
    font-weight: 600;
    color: #46b450;
    min-width: 80px;
    margin-right: 12px;
}

.smr-activity-message {
    flex: 1;
    color: #555;
}

.smr-no-activities {
    text-align: center;
    padding: 20px;
    color: #666;
    font-style: italic;
    font-size: 13px;
}

/* Frontend Shortcode Styling */
.smr-frontend-report {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.smr-frontend-report .smr-status-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 25px;
    background: linear-gradient(135deg, #f7fff7 0%, #e8f5e8 100%);
    border: 2px solid #46b450;
    border-radius: 10px;
}

.smr-frontend-report .smr-status-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.smr-frontend-report h2 {
    margin: 10px 0;
    color: #46b450;
    font-size: 24px;
    font-weight: 700;
}

.smr-frontend-report .smr-last-maintenance {
    color: #666;
    font-size: 16px;
    margin: 0;
}

/* Recent Activities for Frontend */
.smr-recent-activities {
    margin: 30px 0;
}

.smr-recent-activities h3 {
    color: #23282d;
    font-size: 20px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #46b450;
}

.smr-frontend-report .smr-activities-list {
    max-height: none;
    border: none;
}

.smr-frontend-report .smr-activity-item {
    padding: 15px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.smr-frontend-report .smr-activity-date {
    font-size: 14px;
    min-width: 100px;
}

.smr-frontend-report .smr-activity-message {
    font-size: 14px;
}

/* Download Section */
.smr-download-section {
    text-align: center;
    margin-top: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 6px;
}

.smr-download-btn {
    background: #46b450;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.3s ease;
}

.smr-download-btn:hover {
    background: #3ba93f;
    color: #fff;
    text-decoration: none;
}

/* Responsive Design */
@media screen and (max-width: 782px) {
    .smr-status-header {
        flex-direction: column;
        text-align: center;
    }
    
    .smr-status-icon {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .smr-action-buttons {
        flex-direction: column;
    }
    
    .smr-action-buttons .button {
        min-width: auto;
        margin-bottom: 5px;
    }
    
    .smr-activity-item {
        flex-direction: column;
    }
    
    .smr-activity-date {
        min-width: auto;
        margin-right: 0;
        margin-bottom: 5px;
    }
    
    .smr-frontend-report {
        margin: 10px;
        padding: 15px;
    }
    
    .smr-frontend-report h2 {
        font-size: 20px;
    }
    
    .smr-frontend-report .smr-last-maintenance {
        font-size: 14px;
    }
}

/* Print Styles */
@media print {
    .smr-widget-actions,
    .smr-download-section {
        display: none;
    }
    
    .smr-frontend-report {
        box-shadow: none;
        border: 1px solid #000;
    }
}

/* Accessibility Improvements */
.smr-action-buttons .button:focus,
.smr-download-btn:focus {
    outline: 2px solid #46b450;
    outline-offset: 2px;
}

/* Animation for toggle */
.smr-full-report {
    transition: all 0.3s ease;
}

/* Loading states */
.smr-loading {
    opacity: 0.6;
    pointer-events: none;
}

.smr-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #46b450;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
} 