/**
 * Event Participant Request System Styles
 */

/* Main participation section */
#event-participation-section {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

#event-participation-section h3 {
    margin-top: 0;
    color: #333;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
}

/* Participation status display */
.participation-status {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

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

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

.participation-status.status-denied {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Multi-step form */
#event-participation-form {
    max-width: 600px;
}

/* Auto-scroll highlight effect for dashboard */
.event-request-manager.highlight-dashboard {
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    border: 2px solid #2196f3;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
    transition: all 0.3s ease-in-out;
    transform: scale(1.02);
}

.event-request-manager {
    transition: all 0.3s ease-in-out;
}

.form-step {
    background: white;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 20px;
    margin-bottom: 20px;
}

.form-step h4 {
    margin-top: 0;
    color: #0073aa;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.form-step label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    margin-top: 15px;
}

.form-step input,
.form-step select,
.form-step textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.form-step input:focus,
.form-step select:focus,
.form-step textarea:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 5px rgba(0, 115, 170, 0.3);
}

/* Buttons */
.form-step .button {
    background: #0073aa;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

/* Request Summary Styles */
.request-summary {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.request-summary h4 {
    margin-top: 0;
    color: #333;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
}

.request-summary p {
    margin: 10px 0;
    line-height: 1.5;
}

.request-summary .dashicons {
    vertical-align: middle;
    margin-right: 5px;
}

.request-summary.status-pending {
    background: #fff3cd;
    border-color: #ffeeba;
}

.member-list {
    margin-left: 25px;
}

.member-list li {
    margin-bottom: 5px;
}

.form-step .button {
    margin-top: 15px;
    margin-right: 10px;
}

.form-step .button:hover {
    background: #005a87;
}

.form-step .button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.form-step .approve-request,
.request-actions .approve-request {
    background-color: #28a745;
    color: white!important;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.2s;
}

.approve-request:hover {
    background-color: #218838;
}

.form-step .deny-request,
.deny-request {
    background-color: #dc3545 !important;
    color: white !important;
    border: none !important;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.2s;
    text-decoration: none;
}

.deny-request:hover,
.form-step .deny-request:hover {
    background-color: #c82333 !important;
    color: white !important;
}

.form-step .button-secondary {
    background: #666;
}

.form-step .button-secondary:hover {
    background: #555;
}

/* Status messages */
.status-message {
    padding: 10px;
    border-radius: 4px;
    margin: 15px 0;
}

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

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

.status-message .dashicons {
    margin-right: 5px;
    vertical-align: middle;
    width: 18px;
    height: 18px;
    font-size: 18px;
}

.status-badge .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

.status-badge.status-approved .dashicons {
    color: #155724;
}

.status-badge.status-denied .dashicons {
    color: #721c24;
}

.status-badge.status-pending .dashicons {
    color: #856404;
}

/* Group members section */
.group-member-input {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 15px;
}

.group-member-input h5 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #495057;
}

/* Validation results */
.validation-results {
    margin-top: 15px;
}

.member-validation {
    padding: 8px 12px;
    margin-bottom: 5px;
    border-radius: 4px;
}

.member-validation.valid {
    background: #d4edda;
    color: #155724;
}

.member-validation.invalid {
    background: #f8d7da;
    color: #721c24;
}

.member-validation .dashicons {
    margin-right: 5px;
    vertical-align: middle;
    width: 18px;
    height: 18px;
    font-size: 18px;
}

/* Request summary */
.request-summary {
    background: #e9ecef;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 20px;
}

.request-summary h5 {
    margin-top: 0;
    color: #495057;
}

.request-summary ul {
    margin: 10px 0;
    padding-left: 20px;
}

/* Progress indicator (optional) */
.progress-container {
    background: #e9ecef;
    border-radius: 10px;
    height: 8px;
    margin-bottom: 20px;
    overflow: hidden;
}

.progress-bar {
    background: #0073aa;
    height: 100%;
    transition: width 0.3s ease;
    width: 25%;
}

/* Step navigation */
.request-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.step-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.step-navigation .button {
    min-width: 100px;
}

/* Admin meta box styles */
.participant-requests-list {
    max-height: 500px;
    overflow-y: auto;
}

.request-item {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.request-item:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.request-item.status-pending {
    border-left: 4px solid #ffc107;
}

.request-item.status-approved {
    border-left: 4px solid #28a745;
}

.request-item.status-denied {
    border-left: 4px solid #dc3545;
}

.request-item h4 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #333;
}

.request-item p {
    margin: 8px 0;
    display: flex;
    align-items: center;
}

.request-item p .dashicons {
    margin-right: 8px;
    color: #0073aa;
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.request-item ul {
    margin: 5px 0 5px 20px;
}

/* Group members list styling */
.group-members-list {
    list-style: none;
    margin: 10px 0;
    padding: 0;
    background: #f8f9fa;
    border-radius: 6px;
    padding: 12px;
}

.group-members-list .group-member {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
    flex-wrap: wrap;
}

.group-members-list .group-member:last-child {
    border-bottom: none;
}

.group-members-list .member-name {
    font-weight: 600;
    color: #333;
    min-width: 120px;
}

.group-members-list .member-email {
    color: #666;
    font-size: 0.9em;
    flex: 1;
}

.group-members-list .membership-status {
    font-size: 0.85em;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.group-members-list .membership-status.member {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.group-members-list .membership-status.non-member {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.request-actions {
    margin: 15px 0 10px 0;
    display: flex;
    gap: 10px;
    align-items: center;
}

.request-actions .button,
.request-actions button {
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    border: none;
    transition: all 0.2s ease;
}

.request-actions .status-badge {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.creator-notes {
    margin-top: 10px;
}

.creator-notes label {
    font-weight: bold;
    margin-bottom: 5px;
    display: block;
}

.creator-notes textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    resize: vertical;
}


.request-details {
    margin-top: 10px;
    background: #f9f9f9;
    padding: 12px;
    border-radius: 6px;
}

.event-requests-list h4 {
    margin-top: 15px!important;
}

/* Responsive design */
@media (max-width: 768px) {
    #event-participation-section {
        padding: 15px;
        margin: 15px 0;
    }
    
    .form-step {
        padding: 15px;
    }
    
    .form-step input,
    .form-step select,
    .form-step textarea {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .step-navigation {
        flex-direction: column;
        gap: 10px;
    }
    
    .step-navigation .button {
        width: 100%;
    }
    
    .request-actions {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    
    .request-actions .button {
        margin-right: 0;
        width: 100%;
    }
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Accessibility improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus styles for better accessibility */
.form-step .button:focus,
.form-step input:focus,
.form-step select:focus,
.form-step textarea:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .form-step {
        border: 2px solid #000;
    }
    
    .status-message.success {
        background: #000;
        color: #fff;
    }
    
    .status-message.error {
        background: #fff;
        color: #000;
        border: 2px solid #000;
    }
}
