/* TS Event Plugin Styles */

/* Reset and Base Styles */
.ts-event-plugin * {
    box-sizing: border-box;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Site Header */
.site-header {
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 20px 0;
    margin-bottom: 40px;
}

.site-title a {
    color: #333;
    text-decoration: none;
    font-size: 24px;
    font-weight: bold;
}

/* Page Header */
.page-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
}

.page-title {
    font-size: 2.5em;
    margin: 0 0 10px 0;
    font-weight: 300;
}

.page-description {
    font-size: 1.2em;
    margin: 0;
    opacity: 0.9;
}

/* Events Grid */
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

/* Event Card */
.event-card {
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.event-card.hovered {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

/* Event Thumbnail */
.event-thumbnail {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.event-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.event-card:hover .event-thumbnail img {
    transform: scale(1.05);
}

.event-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 48px;
}

.event-category {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(255,255,255,0.9);
    color: #333;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Event Content */
.event-content {
    padding: 25px;
}

.event-title {
    margin: 0 0 15px 0;
    font-size: 1.4em;
    line-height: 1.3;
}

.event-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.event-title a:hover {
    color: #667eea;
}

.event-title a:focus {
    outline: none;
    text-decoration: underline;
}

/* Event Meta */
.event-meta {
    margin-bottom: 15px;
}

.event-meta > div {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    font-size: 14px;
    color: #666;
}

.event-meta .dashicons {
    margin-right: 8px;
    color: #667eea;
    font-size: 16px;
}

/* Event Excerpt */
.event-excerpt {
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Event Actions */
.event-actions {
    text-align: center;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #f8f9fa;
    color: #333;
    border: 2px solid #e9ecef;
}

.btn-secondary:hover {
    background: #e9ecef;
    border-color: #dee2e6;
}

.btn-secondary:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(108, 117, 125, 0.3);
}

/* No Events */
.no-events {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.no-events p {
    font-size: 1.2em;
    margin: 0;
}

/* Site Footer */
.site-footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 30px 0;
    margin-top: 60px;
}

/* Event Embed Styles */
.ts-event-embed {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.event-embed-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    border: 1px solid #e9ecef;
}

.event-embed-thumbnail {
    position: relative;
    height: 150px;
    overflow: hidden;
}

.event-embed-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.event-embed-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 32px;
}

.event-embed-content {
    padding: 20px;
}

.event-embed-title {
    margin: 0 0 15px 0;
    font-size: 1.2em;
    line-height: 1.3;
}

.event-embed-title a {
    color: #333;
    text-decoration: none;
}

.event-embed-title a:hover {
    color: #667eea;
}

.event-embed-title a:focus {
    outline: none;
    text-decoration: underline;
}

.event-embed-meta {
    margin-bottom: 15px;
}

.event-embed-meta > div {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
    font-size: 13px;
    color: #666;
}

.event-embed-meta .dashicons {
    margin-right: 6px;
    color: #667eea;
    font-size: 14px;
}

.event-embed-excerpt {
    color: #666;
    line-height: 1.5;
    margin-bottom: 15px;
    font-size: 14px;
}

.event-embed-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.event-embed-actions .btn {
    padding: 8px 16px;
    font-size: 12px;
    flex: 1;
    min-width: 100px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .page-title {
        font-size: 2em;
    }
    
    .events-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .event-content {
        padding: 20px;
    }
    
    .event-embed-actions {
        flex-direction: column;
    }
    
    .event-embed-actions .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .page-header {
        padding: 30px 0;
    }
    
    .page-title {
        font-size: 1.8em;
    }
    
    .event-card {
        margin: 0 10px;
    }
}

/* Single Event Page Styles */
.single-ts_event .event-details {
    background: #fff;
    border-radius: 15px;
    padding: 30px;
    margin: 30px 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.event-details-header {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
    margin-bottom: 30px;
}

.event-details-thumbnail {
    border-radius: 10px;
    overflow: hidden;
}

.event-details-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
}

.event-details-info h1 {
    margin: 0 0 15px 0;
    color: #333;
}

.event-categories {
    margin-bottom: 20px;
}

.event-category-tag {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: 8px;
    margin-bottom: 8px;
}

.event-details-meta {
    margin-bottom: 20px;
}

.event-details-meta > div {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.event-details-meta .dashicons {
    margin-right: 10px;
    color: #667eea;
}

.event-details-description {
    line-height: 1.8;
    color: #666;
    margin-bottom: 30px;
}

.event-details-section {
    margin-bottom: 30px;
}

.event-details-section h3 {
    color: #333;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.event-details-content {
    line-height: 1.6;
    color: #666;
}

.event-details-cta {
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    color: white;
}

.event-details-cta h3 {
    margin: 0 0 15px 0;
    color: white;
}

.event-details-cta .btn {
    background: white;
    color: #667eea;
    font-size: 16px;
    padding: 15px 30px;
}

.event-details-cta .btn:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
}

/* Social Share Buttons */
.event-share {
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

.event-share h3 {
    margin: 0 0 15px 0;
    color: #333;
}

.social-share-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.social-share-buttons .btn {
    padding: 10px 20px;
    font-size: 14px;
    border-radius: 25px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-facebook {
    background: #1877f2;
    color: white;
}

.btn-twitter {
    background: #1da1f2;
    color: white;
}

.btn-linkedin {
    background: #0077b5;
    color: white;
}

.btn-email {
    background: #ea4335;
    color: white;
}

.btn-facebook:focus,
.btn-twitter:focus,
.btn-linkedin:focus,
.btn-email:focus {
    outline: none;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Embed Code Section */
.event-embed-code {
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

.event-embed-code h3 {
    margin: 0 0 15px 0;
    color: #333;
}

.embed-code {
    display: flex;
    align-items: center;
    gap: 15px;
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.embed-code code {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 5px;
    font-family: 'Courier New', monospace;
    flex: 1;
    user-select: all;
    cursor: pointer;
}

.embed-code code:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
}

.btn-copy {
    background: #28a745;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}

.btn-copy:hover {
    background: #218838;
}

.btn-copy:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.3);
}

/* FAQ Accordion Styles */
.faq-accordion {
    margin-top: 20px;
}

.faq-item {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 10px;
    overflow: hidden;
}

.faq-question {
    background: #f8f9fa;
    padding: 15px 20px;
    cursor: pointer;
    font-weight: 600;
    color: #333;
    transition: background-color 0.3s ease;
    position: relative;
}

.faq-question:hover {
    background: #e9ecef;
}

.faq-question:focus {
    outline: none;
    background: #e9ecef;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
}

.faq-question::after {
    content: '+';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    font-weight: bold;
    color: #667eea;
    transition: transform 0.3s ease;
}

.faq-item.active .faq-question::after {
    transform: translateY(-50%) rotate(45deg);
}

.faq-answer {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    background: white;
}

.faq-item.active .faq-answer {
    padding: 20px;
    max-height: 500px;
}

/* Countdown Timer */
.event-countdown {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 10px;
    animation: pulse 2s infinite;
}

.event-countdown .dashicons {
    color: white;
    font-size: 14px;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* Loading States */
.event-card.loading {
    opacity: 0.7;
    pointer-events: none;
}

.event-card.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #667eea;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@media (max-width: 768px) {
    .event-details-header {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .social-share-buttons {
        flex-direction: column;
    }
    
    .social-share-buttons .btn {
        width: 100%;
        justify-content: center;
    }
    
    .embed-code {
        flex-direction: column;
        align-items: stretch;
    }
    
    .embed-code code {
        word-break: break-all;
    }
}

/* Print Styles */
@media print {
    .event-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .event-details-cta,
    .event-share,
    .event-embed-code {
        display: none;
    }
    
    .btn {
        display: none;
    }
    
    .page-header {
        background: none !important;
        color: #000 !important;
    }
    
    .event-category,
    .event-category-tag {
        background: #ccc !important;
        color: #000 !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .event-card {
        border: 2px solid #000;
    }
    
    .btn {
        border: 2px solid #000;
    }
    
    .event-category,
    .event-category-tag {
        border: 1px solid #000;
    }
    
    .faq-question {
        border: 1px solid #000;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .event-card,
    .btn,
    .faq-answer,
    .event-countdown {
        transition: none;
        animation: none;
    }
    
    .event-card:hover {
        transform: none;
    }
    
    .btn:hover {
        transform: none;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .event-card {
        background: #2d3748;
        color: #e2e8f0;
    }
    
    .event-title a {
        color: #e2e8f0;
    }
    
    .event-title a:hover {
        color: #90cdf4;
    }
    
    .event-meta > div {
        color: #a0aec0;
    }
    
    .event-excerpt {
        color: #a0aec0;
    }
    
    .event-details {
        background: #2d3748;
        color: #e2e8f0;
    }
    
    .event-details-info h1 {
        color: #e2e8f0;
    }
    
    .event-details-section h3 {
        color: #e2e8f0;
        border-bottom-color: #90cdf4;
    }
    
    .event-details-content {
        color: #a0aec0;
    }
    
    .event-share {
        background: #4a5568;
    }
    
    .event-share h3 {
        color: #e2e8f0;
    }
    
    .event-embed-code {
        background: #4a5568;
    }
    
    .event-embed-code h3 {
        color: #e2e8f0;
    }
    
    .embed-code {
        background: #2d3748;
        border-color: #4a5568;
    }
    
    .embed-code code {
        background: #4a5568;
        color: #e2e8f0;
    }
    
    .faq-question {
        background: #4a5568;
        color: #e2e8f0;
        border-color: #4a5568;
    }
    
    .faq-question:hover {
        background: #2d3748;
    }
    
    .faq-answer {
        background: #2d3748;
        color: #a0aec0;
    }
    
    .ts-event-embed {
        background: #2d3748;
    }
    
    .event-embed-card {
        background: #2d3748;
        border-color: #4a5568;
    }
    
    .event-embed-title a {
        color: #e2e8f0;
    }
    
    .event-embed-title a:hover {
        color: #90cdf4;
    }
    
    .event-embed-meta > div {
        color: #a0aec0;
    }
    
    .event-embed-excerpt {
        color: #a0aec0;
    }
}

/* RTL Support */
[dir="rtl"] .event-meta .dashicons,
[dir="rtl"] .event-details-meta .dashicons,
[dir="rtl"] .event-embed-meta .dashicons {
    margin-right: 0;
    margin-left: 8px;
}

[dir="rtl"] .faq-question::after {
    right: auto;
    left: 20px;
}

[dir="rtl"] .event-category {
    left: auto;
    right: 15px;
}

[dir="rtl"] .social-share-buttons .btn {
    flex-direction: row-reverse;
}

[dir="rtl"] .embed-code {
    flex-direction: row-reverse;
}

/* Focus Visible */
.event-card:focus-within {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

.event-embed-card:focus-within {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Skip Link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #667eea;
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 1000;
}

.skip-link:focus {
    top: 6px;
}

/* Screen Reader Only */
.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;
} 