/* Events Frontend Styles - Modern Airbnb-like Design */

/* Event Cards */
.ks-event-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.ks-event-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    border-color: #007cba;
}

.ks-event-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.ks-event-title {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #212529;
    line-height: 1.3;
    flex: 1;
}

.ks-event-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.ks-event-title a:hover {
    color: #007cba;
}

.ks-event-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 12px;
    flex-shrink: 0;
}

.ks-badge-past {
    background: #f8f9fa;
    color: #6c757d;
}

.ks-badge-full {
    background: #f8d7da;
    color: #721c24;
}

.ks-badge-limited {
    background: #fff3cd;
    color: #856404;
}

.ks-event-meta {
    margin-bottom: 16px;
}

.ks-event-meta > div {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    font-size: 14px;
    color: #6c757d;
}

.ks-event-meta > div:last-child {
    margin-bottom: 0;
}

.ks-icon {
    width: 16px;
    height: 16px;
    margin-right: 8px;
    flex-shrink: 0;
}

.ks-event-datetime {
    font-weight: 500;
    color: #495057;
}

.ks-event-price {
    font-weight: 600;
}

.ks-price {
    font-size: 16px;
    font-weight: 700;
    color: #007cba;
}

.ks-free-price {
    color: #28a745;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 14px;
}

.ks-event-description {
    margin-bottom: 20px;
    color: #6c757d;
    line-height: 1.5;
    font-size: 14px;
}

.ks-event-actions {
    margin-bottom: 16px;
}

.ks-enroll-btn,
.ks-cancel-btn {
    background: #007cba;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-block;
    text-decoration: none;
    text-align: center;
    min-width: 120px;
}

.ks-enroll-btn:hover,
.ks-cancel-btn:hover {
    background: #005a87;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.3);
}

.ks-cancel-btn {
    background: #dc3545;
}

.ks-cancel-btn:hover {
    background: #c82333;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.ks-enroll-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.ks-event-footer {
    border-top: 1px solid #f1f3f4;
    padding-top: 16px;
}

.ks-view-details {
    display: inline-flex;
    align-items: center;
    color: #007cba;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.ks-view-details:hover {
    color: #005a87;
}

.ks-view-details .ks-icon {
    width: 14px;
    height: 14px;
    margin-left: 4px;
}

/* Events Grid */
.ks-events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
    margin: 24px 0;
}

@media (max-width: 768px) {
    .ks-events-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .ks-event-card {
        padding: 20px;
        margin-bottom: 16px;
    }
    
    .ks-event-title {
        font-size: 18px;
    }
    
    .ks-event-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .ks-event-badge {
        margin-left: 0;
        margin-top: 8px;
    }
}

/* Single Event Page */
.ks-single-event {
    max-width: 800px;
    margin: 0 auto;
    padding: 24px;
}

.ks-single-event-header {
    text-align: center;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e9ecef;
}

.ks-single-event-title {
    font-size: 32px;
    font-weight: 700;
    color: #212529;
    margin: 0 0 16px 0;
    line-height: 1.2;
}

.ks-single-event-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    margin: 24px 0;
    padding: 24px;
    background: #f8f9fa;
    border-radius: 12px;
}

.ks-single-event-meta > div {
    text-align: center;
}

.ks-single-event-meta h4 {
    margin: 0 0 8px 0;
    font-size: 14px;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ks-single-event-meta p {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
    color: #212529;
}

.ks-single-event-content {
    margin-bottom: 32px;
    line-height: 1.6;
    color: #495057;
}

.ks-single-event-content h2,
.ks-single-event-content h3,
.ks-single-event-content h4 {
    color: #212529;
    margin-top: 24px;
    margin-bottom: 12px;
}

.ks-single-event-content h2:first-child,
.ks-single-event-content h3:first-child,
.ks-single-event-content h4:first-child {
    margin-top: 0;
}

.ks-single-event-actions {
    text-align: center;
    padding: 24px;
    background: #f8f9fa;
    border-radius: 12px;
}

.ks-single-event-actions .ks-enroll-btn,
.ks-single-event-actions .ks-cancel-btn {
    font-size: 16px;
    padding: 16px 32px;
    min-width: 180px;
}

/* No Events Message */
.ks-no-events {
    text-align: center;
    padding: 48px 24px;
    color: #6c757d;
    font-size: 16px;
}

.ks-no-events::before {
    content: "📅";
    font-size: 48px;
    display: block;
    margin-bottom: 16px;
}

/* Loading States */
.ks-loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.ks-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 #007cba;
    border-radius: 50%;
    animation: ks-spin 1s linear infinite;
}

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

/* Success/Error Messages */
.ks-message {
    padding: 12px 16px;
    border-radius: 8px;
    margin: 16px 0;
    font-weight: 500;
    display: flex;
    align-items: center;
}

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

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

.ks-message::before {
    content: "";
    width: 16px;
    height: 16px;
    margin-right: 8px;
    flex-shrink: 0;
}

.ks-message-success::before {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23155724' stroke-width='2'%3E%3Cpath d='M22 11.08V12a10 10 0 1 1-5.93-9.14'%3E%3C/path%3E%3Cpolyline points='22,4 12,14.01 9,11.01'%3E%3C/polyline%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
}

.ks-message-error::before {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23721c24' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cline x1='15' y1='9' x2='9' y2='15'%3E%3C/line%3E%3Cline x1='9' y1='9' x2='15' y2='15'%3E%3C/line%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
}

/* Responsive Design */
@media (max-width: 576px) {
    .ks-single-event {
        padding: 16px;
    }
    
    .ks-single-event-title {
        font-size: 24px;
    }
    
    .ks-single-event-meta {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 16px;
    }
    
    .ks-single-event-actions .ks-enroll-btn,
    .ks-single-event-actions .ks-cancel-btn {
        width: 100%;
        margin-bottom: 12px;
    }
}

/* Animation Classes */
.ks-fade-in {
    animation: ks-fade-in 0.3s ease-in-out;
}

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

.ks-slide-up {
    animation: ks-slide-up 0.3s ease-out;
}

@keyframes ks-slide-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
