/* Frontend Styles for The Rising Stars Events Plugin */

.rse-events-container {
    margin: 20px 0;
}

/* Grid Layout */
.rse-events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

/* List Layout */
.rse-events-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.rse-events-list .rse-event-item {
    display: flex;
    background: white;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.rse-events-list .rse-event-image {
    flex: 0 0 250px;
}

.rse-events-list .rse-event-content {
    flex: 1;
    padding: 20px;
}

/* Event Item Styles */
.rse-event-item {
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid #e9ecef;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    position: relative;
}

.rse-event-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.rse-event-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.15);
    border-color: #667eea;
}

.rse-event-image {
    position: relative;
    width: 100%;
    /* height: 100%; */
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.rse-event-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.4s ease;
    border-radius: 0;
}

.rse-event-item:hover .rse-event-image img {
    transform: scale(1.08);
    filter: brightness(1.1);
}

.rse-event-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(transparent, rgba(0,0,0,0.3));
    pointer-events: none;
}

.rse-event-content {
    padding: 20px;
}

.rse-event-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 20px 0;
    color: #2c3e50;
    line-height: 1.3;
    position: relative;
    padding-bottom: 12px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.rse-event-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

.rse-event-title:hover {
    color: #667eea;
    transition: color 0.3s ease;
}

.rse-event-meta {
    margin-bottom: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 16px;
    border-left: 4px solid #667eea;
}

.rse-event-meta > div {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    font-size: 15px;
    color: #495057;
    font-weight: 500;
}

.rse-event-meta > div:last-child {
    margin-bottom: 0;
}

.rse-event-meta .rse-date-icon,
.rse-event-meta .rse-location-icon,
.rse-event-meta .rse-capacity-icon {
    margin-right: 12px;
    font-size: 18px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    width: 20px;
    display: inline-block;
}

.rse-event-date time {
    font-weight: 700;
    color: #2c3e50;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 16px;
}

.rse-time {
    margin-left: 8px;
    color: #6c757d;
    font-weight: 600;
    font-size: 14px;
    background: rgba(102, 126, 234, 0.1);
    padding: 4px 8px;
    border-radius: 6px;
    display: inline-block;
}

.rse-event-description {
    margin-bottom: 20px;
    color: #555;
    line-height: 1.6;
}

.rse-event-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.rse-register-btn,
.rse-details-btn,
.rse-submit-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    text-align: center;
    position: relative;
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.rse-register-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.rse-register-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.rse-register-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.rse-register-btn:hover::before {
    left: 100%;
}

.rse-details-btn {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    border: 2px solid rgba(102, 126, 234, 0.2);
    backdrop-filter: blur(10px);
}

.rse-details-btn:hover {
    background: rgba(102, 126, 234, 0.2);
    color: #5a67d8;
    border-color: #667eea;
    transform: translateY(-1px);
}

.rse-status-badge {
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.rse-status-badge.rse-full {
    background: #FF5722;
    color: white;
}

.rse-status-badge.rse-closed {
    background: #FF9800;
    color: white;
}

.rse-status-badge.rse-ended {
    background: #9E9E9E;
    color: white;
}

/* No Events Message */
.rse-no-events {
    text-align: center;
    padding: 40px 20px;
    background: #f9f9f9;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    color: #666;
}

/* Registration Form Styles */
.rse-registration-form-container {
    max-width: 500px;
    margin: 0;
    padding: 30px 25px;
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    border: none;
    border-radius: 0 0 24px 24px;
    position: relative;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.rse-registration-form-container h3 {
    margin: 0 0 30px 0;
    color: #2c3e50;
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    position: relative;
    padding-bottom: 15px;
}

.rse-registration-form-container h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

.rse-form-row {
    margin-bottom: 18px;
    position: relative;
}

.rse-form-row label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 15px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.rse-form-row .required {
    color: #e74c3c;
    font-weight: 700;
}

.rse-form-row input,
.rse-form-row textarea {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 15px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: all 0.3s ease;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
}

.rse-form-row input:focus,
.rse-form-row textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    background: rgba(255, 255, 255, 1);
    transform: translateY(-1px);
}

.rse-form-row input::placeholder,
.rse-form-row textarea::placeholder {
    color: #adb5bd;
    font-style: italic;
}

.rse-submit-btn {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    margin-top: 5px;
}

.rse-submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.rse-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.rse-submit-btn:hover::before {
    left: 100%;
}

.rse-submit-btn:disabled {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 8px rgba(149, 165, 166, 0.3);
}

.rse-submit-btn:disabled::before {
    display: none;
}

/* Old modal classes removed - using fresh popup system */

.rse-form-messages {
    margin-top: 20px;
    padding: 16px 20px;
    border-radius: 12px;
    display: none;
    font-weight: 500;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    animation: messageSlideIn 0.3s ease;
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.rse-form-messages.success {
    background: linear-gradient(135deg, #d1f2eb 0%, #a3e7d4 100%);
    color: #0c5460;
    border: 2px solid #7dd3c0;
    display: block;
    position: relative;
}

.rse-form-messages.success::before {
    content: '✓';
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background: #28a745;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 12px;
}

.rse-form-messages.success {
    padding-left: 50px;
}

.rse-form-messages.error {
    background: linear-gradient(135deg, #f8d7da 0%, #f1c2c7 100%);
    color: #721c24;
    border: 2px solid #f5c6cb;
    display: block;
    position: relative;
}

.rse-form-messages.error::before {
    content: '⚠';
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 12px;
}

.rse-form-messages.error {
    padding-left: 50px;
}

.rse-registration-unavailable {
    text-align: center;
    padding: 30px;
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
}

/* Loading states */
.rse-loading {
    opacity: 0.6;
    pointer-events: none;
}

.rse-loading .rse-submit-btn::after {
    content: " ⏳";
}

/* 🚀 Fresh New Modal System */
.rse-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
    z-index: 999999;
    animation: popupFadeIn 0.3s ease-out;
}

@keyframes popupFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.rse-popup-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 550px;
    max-height: 90vh;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.3);
    overflow: hidden;
    animation: popupSlideIn 0.4s ease-out;
}

@keyframes popupSlideIn {
    from { 
        transform: translate(-50%, -60%);
        opacity: 0;
        scale: 0.95;
    }
    to { 
        transform: translate(-50%, -50%);
        opacity: 1;
        scale: 1;
    }
}

.rse-popup-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px 30px;
    position: relative;
}

.rse-popup-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    padding-right: 40px;
    line-height: 1.3;
}

.rse-popup-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 35px;
    height: 35px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.rse-popup-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.rse-popup-body {
    padding: 30px;
    max-height: calc(90vh - 140px);
    overflow-y: auto;
}

.rse-popup-form {
    width: 100%;
}

.rse-popup-field {
    margin-bottom: 20px;
}

.rse-popup-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #334155;
    font-size: 14px;
}

.rse-popup-label .required {
    color: #ef4444;
    margin-left: 2px;
}

.rse-popup-input,
.rse-popup-textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #f8fafc;
    font-family: inherit;
    box-sizing: border-box;
}

.rse-popup-input:focus,
.rse-popup-textarea:focus {
    outline: none;
    border-color: #667eea;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.rse-popup-textarea {
    resize: vertical;
    min-height: 100px;
}

.rse-popup-submit {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 16px 24px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.rse-popup-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.rse-popup-submit:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.rse-popup-message {
    margin-top: 15px;
    padding: 12px 16px;
    border-radius: 8px;
    font-weight: 500;
    display: none;
}

.rse-popup-message.success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.rse-popup-message.error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .rse-popup-container {
        width: 95%;
        margin: 0;
        max-height: 95vh;
    }
    
    .rse-popup-header {
        padding: 20px 25px;
    }
    
    .rse-popup-title {
        font-size: 18px;
    }
    
    .rse-popup-body {
        padding: 25px;
    }
    
    .rse-popup-field {
        margin-bottom: 18px;
    }
}

/* General Responsive Design */
@media (max-width: 768px) {
    .rse-events-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .rse-events-list .rse-event-item {
        flex-direction: column;
    }
    
    .rse-events-list .rse-event-image {
        flex: none;
        height: 200px;
    }
    
    .rse-event-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .rse-register-btn,
    .rse-details-btn {
        width: 100%;
        text-align: center;
    }
    
    .rse-registration-form-container {
        margin: 20px;
        padding: 20px;
    }
    
    .rse-modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .rse-event-content {
        padding: 15px;
    }
    
    .rse-event-title {
        font-size: 18px;
    }
    
    .rse-registration-form-container {
        padding: 15px;
    }
}
