/**
 * WAI Frontend Styles
 * WordPress Attendance Integration - Frontend CSS
 * 
 * @package WAI
 * @version 1.0.0
 */

/* ========================================
   Events List
======================================== */

.wai-events-list {
    display: grid;
    gap: 20px;
    margin: 20px 0;
}

.wai-event-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.wai-event-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.wai-event-title {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 1.3em;
}

.wai-event-location,
.wai-event-date,
.wai-event-attendees {
    margin: 8px 0;
    color: #666;
    font-size: 0.95em;
}

.wai-event-description {
    margin-top: 15px;
    color: #555;
    line-height: 1.6;
}

.wai-icon {
    margin-right: 8px;
}

.wai-no-events {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-style: italic;
}

/* ========================================
   Certificates
======================================== */

.wai-certificates-list {
    margin: 20px 0;
}

.wai-certificates-list h3 {
    margin-bottom: 20px;
    color: #2c3e50;
}

.wai-certificate-card {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    transition: all 0.2s;
}

.wai-certificate-card:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.wai-cert-icon {
    font-size: 2.5em;
    margin-right: 15px;
}

.wai-cert-details {
    flex: 1;
}

.wai-cert-details h4 {
    margin: 0 0 5px 0;
    color: #2c3e50;
}

.wai-cert-date {
    margin: 0;
    color: #666;
    font-size: 0.9em;
}

.wai-cert-actions {
    margin-left: 15px;
}

.wai-btn {
    display: inline-block;
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
}

.wai-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    color: white;
}

.wai-btn-download {
    font-size: 0.9em;
}

.wai-no-certificates {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-style: italic;
}

/* ========================================
   Verification
======================================== */

.wai-verify-prompt,
.wai-verify-success,
.wai-verify-error {
    text-align: center;
    padding: 40px 20px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.wai-verify-icon {
    font-size: 4em;
    margin-bottom: 20px;
}

.wai-verify-icon.success {
    color: #4caf50;
}

.wai-verify-icon.error {
    color: #f44336;
}

.wai-verify-success h3 {
    color: #4caf50;
    margin-bottom: 10px;
}

.wai-verify-error h3 {
    color: #f44336;
    margin-bottom: 10px;
}

.wai-verify-details {
    max-width: 500px;
    margin: 30px auto;
    text-align: left;
    background: #f8f9fa;
    border-radius: 6px;
    padding: 20px;
}

.wai-verify-row {
    display: flex;
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
}

.wai-verify-row:last-child {
    border-bottom: none;
}

.wai-verify-row strong {
    flex: 0 0 120px;
    color: #666;
}

.wai-verify-row span {
    flex: 1;
    color: #2c3e50;
}

.wai-verify-info {
    margin-top: 20px;
    padding: 15px;
    background: #e3f2fd;
    border-radius: 6px;
    color: #1565c0;
    font-size: 0.9em;
}

/* ========================================
   Registration Status
======================================== */

.wai-registration-status {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
}

.wai-registration-status h3 {
    margin: 0 0 15px 0;
    color: #2c3e50;
}

.wai-status-badge {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9em;
    margin-bottom: 15px;
}

.wai-status-registered {
    background: #e8f5e9;
    color: #2e7d32;
}

.wai-status-pending {
    background: #fff3e0;
    color: #f57c00;
}

.wai-status-not-registered {
    background: #ffebee;
    color: #c62828;
}

.wai-event-info {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.wai-event-info p {
    margin: 8px 0;
    color: #666;
}

/* ========================================
   Widget Styles
======================================== */

.wai-widget-events,
.wai-widget-certificates {
    list-style: none;
    padding: 0;
    margin: 0;
}

.wai-widget-event-item,
.wai-widget-cert-item {
    padding: 12px 0;
    border-bottom: 1px solid #e0e0e0;
}

.wai-widget-event-item:last-child,
.wai-widget-cert-item:last-child {
    border-bottom: none;
}

.wai-widget-event-item strong {
    display: block;
    color: #2c3e50;
    margin-bottom: 5px;
}

.wai-event-date,
.wai-event-location {
    font-size: 0.85em;
    color: #666;
}

.wai-cert-count {
    margin-bottom: 15px;
    padding: 10px;
    background: #f0f0f0;
    border-radius: 4px;
    font-weight: 600;
    text-align: center;
}

.wai-view-all {
    text-align: center;
    margin-top: 15px;
}

.wai-view-all a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.wai-view-all a:hover {
    text-decoration: underline;
}

/* ========================================
   Error Messages
======================================== */

.wai-error {
    padding: 15px;
    background: #ffebee;
    border: 1px solid #ef5350;
    border-radius: 6px;
    color: #c62828;
    margin: 15px 0;
}

/* ========================================
   Responsive Design
======================================== */

@media (max-width: 768px) {
    .wai-certificate-card {
        flex-direction: column;
        text-align: center;
    }
    
    .wai-cert-icon {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .wai-cert-actions {
        margin-left: 0;
        margin-top: 15px;
    }
    
    .wai-verify-details {
        padding: 15px;
    }
    
    .wai-verify-row {
        flex-direction: column;
    }
    
    .wai-verify-row strong {
        margin-bottom: 5px;
    }
}

/* ========================================
   Real-Time Attendee Verification
======================================== */

.wai-status-indicator {
    margin: 15px 0;
    padding: 15px;
    border-radius: 8px;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wai-status-message {
    display: flex;
    align-items: center;
    gap: 10px;
}

.wai-status-indicator .wai-icon {
    font-size: 1.5em;
    margin-right: 5px;
}

.wai-status-text {
    font-weight: 600;
    font-size: 0.95em;
}

/* Checking status */
.wai-status-checking {
    background: #fff8e1;
    border: 1px solid #ffd54f;
    color: #f57f17;
}

.wai-status-checking .wai-icon {
    animation: spin 1.5s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Returning attendee status */
.wai-status-returning {
    background: #e8f5e9;
    border: 1px solid #81c784;
    color: #2e7d32;
}

.wai-status-returning .wai-status-text {
    color: #1b5e20;
}

/* New attendee status */
.wai-status-new {
    background: #e3f2fd;
    border: 1px solid #64b5f6;
    color: #1565c0;
}

.wai-status-new .wai-status-text {
    color: #0d47a1;
}

/* Hide/show animation */
.wai-status-indicator.hiding {
    animation: slideOut 0.2s ease-in;
}

@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

/* ========================================
   Print Styles
======================================== */

@media print {
    .wai-cert-actions,
    .wai-btn,
    .wai-status-indicator {
        display: none;
    }
}
