/**
 * WPEM Frontend Global Styles
 * 
 * @package WP_Event_Manager
 * 
 * This file contains only global styles that are not covered by:
 * - single-event.css (single event pages)
 * - shortcodes-style.css (shortcode styles)
 * - qr-scanner.css (QR scanner functionality)
 */

/* === Global Message System === */
.wpem-message {
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
    font-weight: 500;
}

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

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

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

/* === Global Loading Spinner === */
.wpem-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007cba;
    border-radius: 50%;
    animation: wpem-spin 1s linear infinite;
}

@keyframes wpem-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* === Field Error Messages === */
.wpem-field-error {
    color: #e74c3c;
    font-size: 12px;
    display: block;
    margin-top: 5px;
}

/* === Basic Form Error States === */
input.error,
select.error,
textarea.error {
    border-color: #e74c3c !important;
}

/* === Global Utility Classes === */
.wpem-text-center {
    text-align: center;
}

.wpem-hidden {
    display: none !important;
}

/* === Global Frontend Styles === */

/* Event Registration Forms */
.wpem-registration-form {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

.wpem-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.wpem-form-group input,
.wpem-form-group select,
.wpem-form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.wpem-form-group input:focus,
.wpem-form-group select:focus,
.wpem-form-group textarea:focus {
    border-color: #007cba;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.1);
}

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

.wpem-form-group.required label::after {
    content: ' *';
    color: #e74c3c;
}

.wpem-form-submit {
    text-align: center;
    margin-top: 30px;
}

.wpem-submit-button {
    background-color: #007cba;
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.wpem-submit-button:hover {
    background-color: #005a87;
    color: white;
    text-decoration: none;
}

.wpem-submit-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* Event Lists */
.wpem-events-list {
    display: grid;
    gap: 20px;
    margin: 20px 0;
}

.wpem-event-item {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    transition: box-shadow 0.3s ease;
}

.wpem-event-item:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.wpem-event-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 10px 0;
    color: #333;
}

.wpem-event-title a {
    color: #007cba;
    text-decoration: none;
}

.wpem-event-title a:hover {
    text-decoration: underline;
}

.wpem-event-date {
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
    font-weight: 500;
}

.wpem-event-location {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
}

.wpem-event-excerpt {
    color: #555;
    line-height: 1.6;
    margin-bottom: 15px;
}

.wpem-event-actions {
    text-align: right;
}

.wpem-event-register-btn {
    background-color: #28a745;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.3s ease;
    display: inline-block;
}

.wpem-event-register-btn:hover {
    background-color: #218838;
    color: white;
    text-decoration: none;
}

/* Event Status Indicators */
.wpem-event-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.wpem-event-status.upcoming {
    background-color: #e3f2fd;
    color: #1976d2;
}

.wpem-event-status.ongoing {
    background-color: #e8f5e8;
    color: #2e7d32;
}

.wpem-event-status.completed {
    background-color: #f3e5f5;
    color: #7b1fa2;
}

.wpem-event-status.cancelled {
    background-color: #ffebee;
    color: #c62828;
}

/* Confirmation Pages */
.wpem-confirmation {
    max-width: 500px;
    margin: 40px auto;
    text-align: center;
    padding: 40px 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.wpem-confirmation .wpem-success-icon {
    font-size: 48px;
    color: #28a745;
    margin-bottom: 20px;
}

.wpem-confirmation h2 {
    color: #28a745;
    margin-bottom: 20px;
}

.wpem-qr-code {
    margin: 20px 0;
    text-align: center;
}

.wpem-qr-code canvas {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px;
    background: white;
}

/* Survey Forms */
.wpem-survey-form {
    max-width: 700px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.wpem-survey-form h3 {
    color: #333;
    margin-bottom: 20px;
    border-bottom: 2px solid #007cba;
    padding-bottom: 10px;
}

.wpem-survey-question {
    margin-bottom: 25px;
}

.wpem-survey-question label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: #333;
}

.wpem-radio-group,
.wpem-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wpem-radio-option,
.wpem-checkbox-option {
    display: flex;
    align-items: center;
    gap: 8px;
}

.wpem-radio-option input[type="radio"],
.wpem-checkbox-option input[type="checkbox"] {
    width: auto;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .wpem-registration-form,
    .wpem-survey-form {
        margin: 0 10px;
        padding: 15px;
    }
    
    .wpem-event-item {
        margin: 0 10px;
        padding: 15px;
    }
    
    .wpem-confirmation {
        margin: 20px 10px;
        padding: 30px 15px;
    }
    
    .wpem-events-list {
        margin: 10px;
    }
} 