/* FIPROTUR Events - Frontend Styles */

/* Main Container */
.fiprotur-events-listing {
    width: 100%;
    margin: 2rem 0;
}

.fiprotur-events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Event Card */
.fiprotur-event-card {
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.fiprotur-event-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transform: translateY(-4px);
}

/* Event Thumbnail */
.fiprotur-event-thumbnail {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.fiprotur-event-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.fiprotur-event-thumbnail:hover img {
    transform: scale(1.05);
}

.fiprotur-event-thumbnail a {
    display: block;
    height: 100%;
}

.fiprotur-event-header {
    padding: 1.5rem;
    border-bottom: 1px solid #f0f0f0;
    flex-grow: 1;
}

.fiprotur-event-title {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
}

.fiprotur-event-title a {
    color: #0066cc;
    text-decoration: none;
}

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

.fiprotur-event-office {
    display: inline-block;
    background: #f5f5f5;
    color: #666;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Event Meta */
.fiprotur-event-meta {
    padding: 1.5rem;
    flex-grow: 1;
    background: #fafafa;
}

.fiprotur-event-meta>div {
    margin-bottom: 1rem;
    font-size: 0.95rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

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

.fiprotur-event-meta .label {
    font-weight: 600;
    color: #555;
    min-width: 120px;
    flex-shrink: 0;
}

.fiprotur-event-badges {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.fiprotur-event-office {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #e3f2fd;
    color: #1976d2;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fiprotur-event-status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fiprotur-event-status.active {
    background: #e8f5e8;
    color: #4caf50;
}

.fiprotur-event-status.finished {
    background: #ffebee;
    color: #f44336;
}

.fiprotur-event-card.finished {
    opacity: 0.85;
    border-color: #f44336;
}

.fiprotur-event-card.finished .fiprotur-event-title a {
    color: #666;
}

.fiprotur-event-end-date {
    margin-bottom: 0.75rem;
}

.fiprotur-event-countdown .value.countdown-display {
    font-weight: 700;
    font-size: 1.1em;
    color: #007cba;
    background: rgba(0, 124, 186, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-family: 'Courier New', monospace;
}

.fiprotur-event-countdown .value.countdown-display.active {
    color: #4caf50;
    background: rgba(76, 175, 80, 0.1);
    animation: countdown-pulse 2s infinite;
}

.fiprotur-event-countdown .value.countdown-display.finished {
    color: #f44336;
    background: rgba(244, 67, 54, 0.1);
}

/* Countdown Animation */
@keyframes countdown-pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

.fiprotur-event-actions {
    padding: 1.5rem;
    border-top: 1px solid #f0f0f0;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.fiprotur-btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: #0066cc;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    text-align: center;
    transition: background-color 0.3s ease, transform 0.2s ease;
    border: none;
    cursor: pointer;
}

.fiprotur-btn:hover {
    background: #0052a3;
    transform: translateY(-1px);
    color: #fff;
    text-decoration: none;
}

.fiprotur-btn-primary {
    background: linear-gradient(135deg, #0066cc 0%, #004499 100%);
    box-shadow: 0 2px 4px rgba(0, 102, 204, 0.2);
}

.fiprotur-btn-primary:hover {
    background: linear-gradient(135deg, #0052a3 0%, #003366 100%);
    box-shadow: 0 4px 8px rgba(0, 102, 204, 0.3);
}
}

.fiprotur-event-meta .label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
    text-transform: uppercase;
}

.fiprotur-event-meta .value {
    display: block;
    color: #666;
    line-height: 1.4;
}

/* Event Actions */
.fiprotur-event-actions {
    padding: 1.5rem;
    border-top: 1px solid #f0f0f0;
    background: #f9f9f9;
}

/* Detail Page Layout */
.fiprotur-event-detail-wrapper {
    padding: 2rem 0;
}

.fiprotur-event-detail-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.fiprotur-event-detail {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}

.fiprotur-event-detail-header {
    padding: 2rem;
    background: linear-gradient(135deg, #f5f5f5 0%, #fafafa 100%);
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.fiprotur-event-detail-header .fiprotur-event-title {
    flex-grow: 1;
    margin: 0;
    font-size: 2rem;
    color: #333;
}

.fiprotur-event-office-badge {
    background: #0066cc;
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    white-space: nowrap;
}

/* Featured Image */
.fiprotur-event-featured-image {
    width: 100%;
    max-height: 500px;
    overflow: hidden;
    position: relative;
}

.fiprotur-event-featured-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.fiprotur-event-featured-image:hover img {
    transform: scale(1.02);
}

/* Detail Content */
.fiprotur-event-detail-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    padding: 2rem;
}

.fiprotur-event-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.fiprotur-event-info-row h3 {
    margin: 0 0 0.75rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
}

.fiprotur-event-date-value,
.fiprotur-event-address-value,
.fiprotur-event-capacity-value,
.fiprotur-event-website-value,
.fiprotur-event-telephone-value {
    color: #666;
    line-height: 1.6;
    margin: 0;
}

.fiprotur-event-address-value a {
    color: #007cba;
    text-decoration: none;
    transition: color 0.3s ease;
}

.fiprotur-event-status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 0.5rem;
}

.fiprotur-event-status-badge.active {
    background: #4CAF50;
    color: white;
}

.fiprotur-event-status-badge.finished {
    background: #f44336;
    color: white;
}

.fiprotur-event-end-date-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #007cba;
}

.fiprotur-event-end-date-section h3 {
    margin: 0 0 0.5rem 0;
    color: #333;
    font-size: 1.1rem;
}

.fiprotur-event-end-date-value {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #007cba;
}

.fiprotur-event-content {
    color: #666;
    line-height: 1.6;
}

/* Detail Sidebar */
.fiprotur-event-detail-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.fiprotur-share-section,
.fiprotur-calendar-section {
    background: #f9f9f9;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.fiprotur-share-section h3,
.fiprotur-calendar-section h3 {
    margin: 0 0 1rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: #333;
}

/* Share Buttons */
.fiprotur-share-buttons {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    align-items: center;
    justify-content: flex-start;
}

.fiprotur-share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 0;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background: #fff;
    color: #666;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
}

.fiprotur-share-btn:hover {
    background: #f0f0f0;
    border-color: #999;
    color: #333;
}

.fiprotur-share-btn .share-icon {
    font-size: 16px;
    font-weight: bold;
    display: inline;
}

.fiprotur-share-btn .fiprotur-share-label {
    display: none;
}

.fiprotur-share-copy {
    border-color: #0066cc;
    color: #0066cc;
}

.fiprotur-share-copy:hover {
    background: #e6f0ff;
}

.fiprotur-share-linkedin {
    border-color: #0a66c2;
    color: #0a66c2;
}

.fiprotur-share-linkedin:hover {
    background: #e6f0ff;
}

.fiprotur-share-facebook {
    border-color: #1877f2;
    color: #1877f2;
}

.fiprotur-share-facebook:hover {
    background: #e6f0ff;
}

.fiprotur-share-twitter {
    border-color: #000;
    color: #000;
}

.fiprotur-share-twitter:hover {
    background: #f0f0f0;
}

/* Buttons */
.fiprotur-btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

/* Event Actions */
.fiprotur-event-actions {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1rem;
    visibility: visible !important;
    opacity: 1 !important;
}

.fiprotur-btn-primary {
    background: #0066cc;
    color: #fff;
}

.fiprotur-btn-primary:hover {
    background: #0052a3;
}

.fiprotur-btn-secondary {
    background: #f0f0f0;
    color: #0066cc;
    border: 1px solid #0066cc;
}

.fiprotur-btn-secondary:hover {
    background: #e6f0ff;
}

.fiprotur-btn-calendar {
    width: 100%;
    background: #28a745;
    color: #fff;
}

.fiprotur-btn-calendar:hover {
    background: #218838;
}

.fiprotur-btn-full {
    width: 100%;
}

/* Empty State */
.fiprotur-events-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: #666;
    font-size: 1.1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .fiprotur-events-grid {
        grid-template-columns: 1fr;
    }

    .fiprotur-event-detail-header {
        flex-direction: column;
    }

    .fiprotur-event-detail-header .fiprotur-event-title {
        font-size: 1.5rem;
    }

    .fiprotur-event-detail-content {
        grid-template-columns: 1fr;
    }

    .fiprotur-share-buttons {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .fiprotur-share-btn {
        flex: none;
        width: 32px;
        height: 32px;
        min-width: 32px;
        min-height: 32px;
    }

    .fiprotur-share-btn .fiprotur-share-label {
        display: none;
    }

    .fiprotur-share-btn .share-icon {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .fiprotur-event-card {
        margin: 0;
    }

    .fiprotur-event-detail-header {
        padding: 1rem;
    }

    .fiprotur-event-detail-header .fiprotur-event-title {
        font-size: 1.25rem;
    }

    .fiprotur-event-detail-content {
        padding: 1rem;
    }

    .fiprotur-share-buttons {
        flex-direction: row;
    }

    .fiprotur-share-btn {
        flex: 1;
        padding: 0.5rem;
    }
}

/* General Typography Improvements */
.fiprotur-events-listing h2,
.fiprotur-events-listing h3,
.fiprotur-events-listing h4 {
    color: #333;
    margin-bottom: 1rem;
}

.fiprotur-events-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: #666;
}

.fiprotur-events-empty p {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

/* Loading States */
.fiprotur-event-card {
    position: relative;
}

.fiprotur-event-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: none;
    z-index: 1;
}

/* Share Buttons */
.fiprotur-share-buttons {
    display: flex !important;
    gap: 0.5rem;
    margin-right: 1rem;
    align-items: center;
    flex-wrap: nowrap;
    justify-content: flex-start;
    visibility: visible !important;
    opacity: 1 !important;
}

.fiprotur-share-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: #fff;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
    line-height: 1;
    gap: 4px;
    visibility: visible !important;
    opacity: 1 !important;
}

.fiprotur-share-btn:hover {
    border-color: #007cba;
    background: #007cba;
    color: #fff;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.3);
}

.fiprotur-share-btn:active {
    transform: translateY(0) scale(1);
}

.fiprotur-share-btn .share-icon {
    font-size: 16px;
    line-height: 1;
}

.fiprotur-share-btn .share-text {
    font-size: 12px;
    white-space: nowrap;
    display: inline !important;
    visibility: visible !important;
}

/* Platform-specific colors */
.fiprotur-share-twitter:hover {
    border-color: #000;
    background: #000;
}

.fiprotur-share-facebook:hover {
    border-color: #1877f2;
    background: #1877f2;
}

.fiprotur-share-linkedin:hover {
    border-color: #0077b5;
    background: #0077b5;
}

.fiprotur-share-instagram:hover {
    border-color: #e4405f;
    background: #e4405f;
}

.fiprotur-share-copy:hover {
    border-color: #28a745;
    background: #28a745;
}

/* Copy feedback */
.fiprotur-share-copy.copied {
    border-color: #28a745;
    background: #28a745;
    color: #fff;
}

/* Share Section in Single Event */
.fiprotur-share-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e0e0e0;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.fiprotur-share-section h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
    color: #333;
}

.fiprotur-share-section .fiprotur-share-buttons {
    margin-top: 0;
    justify-content: flex-start;
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Utility Classes */
.fiprotur-text-center {
    text-align: center;
}

.fiprotur-mb-1 {
    margin-bottom: 0.5rem;
}

.fiprotur-mb-2 {
    margin-bottom: 1rem;
}

.fiprotur-mb-3 {
    margin-bottom: 1.5rem;
}

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