/**
 * Zacatrus Events Styles - Mobile First
 *
 * @category    Zacatrus
 * @package     Zacatrus_Events
 * @author      Zacatrus
 */

/* Base Styles - Mobile First */
.zacatrus-events-list {
    max-width: 100%;
}

/* Disabled Message - Full Width */
.events-disabled-message {
    padding: 2rem 1rem;
    background: #fff3cd;
    border-top: 1px solid #ffc107;
    border-bottom: 1px solid #ffc107;
}

.events-disabled-message .message {
    margin: 0 auto;
    border-radius: 4px;
    background: transparent;
    border: none;
}

@media (min-width: 768px) {
    .events-disabled-message {
        padding: 3rem 2rem;
    }
}

.page-title-wrapper {
    margin-bottom: 1.5rem;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

/* Filters */
.events-filters {
    background: #f5f5f5;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
}

.filter-group {
    margin-bottom: 1rem;
}

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* Location Filter Buttons */
.location-filter-group {
    margin-bottom: 1.5rem;
}

.location-filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.location-filter-btn {
    position: relative;
    padding: 0.75rem 1.25rem;
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: #333;
    transition: all 0.3s ease;
    text-align: center;
    min-width: 120px;
}

.location-filter-btn:hover {
    border-color: #007bff;
    background: #f0f8ff;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.2);
}

.location-filter-btn.active {
    background: #007bff;
    border-color: #007bff;
    color: #fff;
}

.location-filter-btn.active:hover {
    background: #0056b3;
    border-color: #0056b3;
}

.location-filter-link {
    display: inline-block;
    padding: 0.5rem 0;
    margin-right: 1rem;
    text-decoration: underline !important;
    color: #007bff !important;
}

.location-filter-link:hover {
    color: #0056b3;
    text-decoration: underline;
}

.location-filter-link.active {
    color: #333;
    font-weight: 600;
    text-decoration: none;
}

/* Meet Type Filter Buttons */
.meet-type-filter-group {
    margin-bottom: 1.5rem;
}

.meet-type-filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.meet-type-filter-btn {
    position: relative;
    padding: 0.75rem 1.25rem;
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: #333;
    transition: all 0.3s ease;
    text-align: center;
    min-width: 120px;
}

.meet-type-filter-btn:hover {
    border-color: #007bff;
    background: #f0f8ff;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.2);
}

.meet-type-filter-btn.active {
    background: #007bff;
    border-color: #007bff;
    color: #fff;
}

.meet-type-filter-btn.active:hover {
    background: #0056b3;
    border-color: #0056b3;
}

.meet-type-filter-link {
    padding: 0.5rem 0;
    color: #007bff !important;
    margin-right: 1rem;
    text-decoration: underline !important;
}

.meet-type-filter-link:hover {
    color: #0056b3;
    text-decoration: underline;
}

.meet-type-filter-link.active {
    color: #333;
    font-weight: 600;
    text-decoration: none;
}

/* Theme Filter Buttons */
.theme-filter-group {
    margin-bottom: 1.5rem;
}

.theme-filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.theme-filter-btn {
    position: relative;
    padding: 0.75rem 1.25rem;
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: #333;
    transition: all 0.3s ease;
    text-align: center;
    min-width: 120px;
}

.theme-filter-btn:hover {
    border-color: #007bff;
    background: #f0f8ff;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.2);
}

.theme-filter-btn.active {
    background: #007bff;
    border-color: #007bff;
    color: #fff;
}

.theme-filter-btn.active:hover {
    background: #0056b3;
    border-color: #0056b3;
}

.theme-filter-link {
    padding: 0.5rem 0;
    color: #007bff !important;
    margin-right: 1rem;
    text-decoration: underline !important;
}

.theme-filter-link:hover {
    color: #0056b3;
    text-decoration: underline;
}

.theme-filter-link.active {
    color: #333;
    font-weight: 600;
    text-decoration: none;
}

.location-name {
    display: block;
}

.location-address-tooltip {
    display: none;
}

/* Location Address Popup */
.location-address-popup {
    position: absolute;
    background: #fff;
    border: 2px solid #007bff;
    border-radius: 6px;
    padding: 0.75rem 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    min-width: 200px;
    max-width: 300px;
    display: none;
}

.location-address-popup .address-text {
    display: block;
    color: #333;
    line-height: 1.5;
    padding: 6px;
}

.location-address-popup::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid #007bff;
}

.location-address-popup::after {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-bottom: 7px solid #fff;
}

.location-address-popup.above::before {
    top: auto;
    bottom: -8px;
    border-bottom: none;
    border-top: 8px solid #007bff;
}

.location-address-popup.above::after {
    top: auto;
    bottom: -6px;
    border-bottom: none;
    border-top: 7px solid #fff;
}

.location-address-popup.clicked {
    box-shadow: 0 6px 16px rgba(0, 123, 255, 0.3);
}

.filter-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
}

.filter-actions {
    margin-top: 1rem;
}

.filter-actions .action.primary {
    width: 100%;
    padding: 0.75rem;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
}

.filter-actions .action.primary:hover {
    background: #0056b3;
}

/* Events Grid */
.events-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

/* Event Card */
.event-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

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

.event-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.event-name-wrapper {
    flex: 1;
    min-width: 200px;
}

.event-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    color: #1a1a1a;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.event-name-link {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.3s ease;
}

.event-name-link:hover {
    color: #007bff;
    text-decoration: underline;
}

.event-theme {
    display: inline-block;
    font-weight: 500;
    color: #007bff;
    background: linear-gradient(135deg, #e3f2fd 0%, #f0f8ff 100%);
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    margin-top: 0.25rem;
    border: 1px solid rgba(0, 123, 255, 0.2);
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.1);
}

.event-type {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #e9ecef;
    border-radius: 12px;
    font-weight: 500;
    color: #495057;
}

.event-details {
    margin-bottom: 1.5rem;
}

.event-detail {
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.event-detail:last-child {
    margin-bottom: 0;
}

.event-detail strong {
    display: inline-block;
    min-width: 120px;
    font-weight: 600;
    color: #333;
}

.slots-count {
    font-weight: 600;
}

.slots-count.available {
    color: #28a745;
}

.slots-count.full {
    color: #dc3545;
}

.event-info-link {
    color: #007bff;
    text-decoration: underline;
    font-weight: 500;
    transition: color 0.3s ease;
}

.event-info-link:hover {
    color: #0056b3;
    text-decoration: underline;
}

.event-description {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
    color: #666;
    line-height: 1.6;
}

/* Event Actions */
.event-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.registration-status {
    padding: 0.5rem;
    border-radius: 4px;
    text-align: center;
    font-weight: 500;
}

.status-confirmed {
    /*background: #d4edda;*/
    color: #155724;
}

.status-waitlist {
    color: #856404;
}

.event-actions .action {
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

.event-actions .action.primary {
    background: #007bff;
    color: white;
}

.event-actions .action.primary:hover {
    background: #0056b3;
}

.event-actions .action.secondary {
    background: #6c757d;
    color: white;
}

.event-actions .action.secondary:hover {
    background: #545b62;
}

.event-actions .action.waitlist-btn {
    background: #ffc107;
    color: #212529;
}

.event-actions .action.waitlist-btn:hover {
    background: #e0a800;
}

.event-actions .action:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Loading State */
.event-card.loading {
    opacity: 0.6;
    pointer-events: none;
}

.event-card.loading .action {
    position: relative;
}

.event-card.loading .action::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    margin: auto;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* Messages */
.message {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

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

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

.message.empty {
    text-align: center;
    padding: 2rem;
}

/* Tablet and Up */
@media (min-width: 768px) {
    .zacatrus-events-list {
        margin: 0 auto;
    }

    .page-title {
        font-size: 2rem;
    }

    .events-filters {
        display: grid;
        grid-template-columns: 1fr 1fr auto;
        gap: 1rem;
        align-items: end;
    }

    .filter-group {
        margin-bottom: 0;
    }

    .filter-actions {
        margin-top: 0;
    }

    .filter-actions .action.primary {
        width: auto;
        min-width: 120px;
    }

    .events-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .event-header {
        flex-wrap: nowrap;
    }

    .event-name {
        font-size: 1.75rem;
    }

    .event-name-link {
        font-size: inherit;
    }

    .event-theme {
        font-size: 1.4rem;
        padding: 0.5rem 1rem;
    }

    .event-actions {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .event-actions .action {
        flex: 0 0 auto;
    }
}

/* Desktop and Up */
@media (min-width: 1024px) {
    .events-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .event-detail strong {
        min-width: 140px;
    }

    .event-name {
        font-size: 2rem;
    }

    .event-name-link {
        font-size: inherit;
    }

    .event-theme {
        font-size: 1.4rem;
        padding: 0.6rem 1.2rem;
    }
}
.filter-buttons {
    margin: 12px 0;
}
.zacatrus-events-list .filter-group {
    margin-bottom: 20px;
}

/* Event View Page */
.event-view-page {
    max-width: 800px;
    margin: 0 auto;
}

.event-back-link {
    margin-bottom: 1.5rem;
}

.event-back-link .back-link {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    transition: color 0.3s ease;
}

.event-back-link .back-link:hover {
    color: #0056b3;
    text-decoration: underline;
}

.event-card-detailed {
    max-width: 100%;
}

.event-card-detailed .event-name {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.event-card-detailed .event-description {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid #eee;
}

.event-card-detailed .description-content {
    margin-top: 0.5rem;
    line-height: 1.8;
}

@media (min-width: 768px) {
    .event-card-detailed .event-name {
        font-size: 2.5rem;
    }
}

/* Phone Modal Styles */
.phone-modal {
    display: none;
}

.phone-modal .phone-form {
    padding: 1rem;
}

.phone-modal .field {
    margin-bottom: 1rem;
}

.phone-modal .field.required .label::after {
    content: ' *';
    color: #e02b27;
}

.phone-modal .control input[type="tel"] {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.phone-modal .note {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #666;
}

.phone-modal .actions-toolbar {
    display: flex;
    justify-content: space-between;
    margin-top: 1.5rem;
    gap: 1rem;
}

.phone-modal .actions-toolbar .primary,
.phone-modal .actions-toolbar .secondary {
    flex: 1;
}

.phone-modal .phone-error {
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
}

/* Update Phone Link */
.update-phone-wrapper {
    margin-top: 8px;
}

.update-phone-link {
    color: #007bff;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.update-phone-link:hover {
    color: #0056b3;
    text-decoration: underline;
}

.calendar-links {
    margin-top: 8px;
}

.calendar-links a {
    color: #007bff;
    text-decoration: underline;
    margin-right: 12px;
}

.calendar-links a:hover {
    color: #0056b3;
    text-decoration: underline;
}