/**
 * Dayboro Events - Public Styles
 * Matching Dayboro Business Directory design system
 */

/* CSS Variables - Matching Business Directory */
:root {
    --de-primary: #2271b1;
    --de-secondary: #555;
    --de-success: #46b450;
    --de-danger: #dc3232;
    --de-warning: #ffb900;
    --de-light: #f8f9fa;
    --de-dark: #191e23;
    --de-border: #ddd;
    --de-shadow: 0 1px 3px rgba(0,0,0,0.1);
    --de-radius: 4px;
}

/* General Layout */
.dayboro-events-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Map Container Styles */
.dayboro-map-container {
    margin: 30px 0;
    background: white;
    border: 1px solid var(--de-border);
    border-radius: var(--de-radius);
    overflow: hidden;
    box-shadow: var(--de-shadow);
}

.map-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: var(--de-light);
    border-bottom: 1px solid var(--de-border);
}

.map-header h3 {
    margin: 0;
    font-size: 18px;
    color: var(--de-dark);
}

.map-controls {
    display: flex;
    gap: 10px;
}

.map-filter-btn,
.map-view-btn {
    padding: 8px 15px;
    background: white;
    border: 1px solid var(--de-border);
    border-radius: var(--de-radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s;
}

.map-filter-btn:hover,
.map-view-btn:hover {
    background: var(--de-primary);
    color: white;
    border-color: var(--de-primary);
}

.map-filters {
    padding: 15px 20px;
    background: #f9f9f9;
    border-bottom: 1px solid var(--de-border);
    display: flex;
    gap: 15px;
}

.map-filter {
    padding: 8px 12px;
    border: 1px solid var(--de-border);
    border-radius: var(--de-radius);
    font-size: 14px;
    flex: 1;
    max-width: 200px;
}

/* Map Info Window Styles */
.map-info-window {
    max-width: 300px;
}

.map-info-window img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: var(--de-radius) var(--de-radius) 0 0;
    margin-bottom: 10px;
}

.info-content h4 {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: var(--de-dark);
}

.info-content p {
    margin: 5px 0;
    font-size: 13px;
    color: var(--de-secondary);
    display: flex;
    align-items: center;
    gap: 5px;
}

.info-content .dashicons {
    font-size: 14px;
    color: var(--de-primary);
}

.info-price {
    font-weight: bold;
    color: var(--de-success);
}

.info-excerpt {
    margin: 10px 0;
    line-height: 1.4;
}

.info-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.btn-view-details,
.btn-add-itinerary {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: var(--de-radius);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
    flex: 1;
    text-align: center;
}

.btn-view-details {
    background: var(--de-primary);
    color: white;
    border: 1px solid var(--de-primary);
}

.btn-view-details:hover {
    background: #1e5d8f;
}

.btn-add-itinerary {
    background: white;
    color: var(--de-primary);
    border: 1px solid var(--de-primary);
}

.btn-add-itinerary:hover {
    background: var(--de-primary);
    color: white;
}

/* Custom Marker Label */
.marker-label {
    background: rgba(0, 0, 0, 0.7);
    padding: 2px 6px;
    border-radius: 50%;
}

/* Leaflet Map Styles */
#itinerary-map {
    height: 400px;
    border: 2px solid var(--de-border);
    border-radius: var(--de-radius);
    margin: 20px 0;
}

.event-marker-icon {
    background: var(--de-primary);
    color: white;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    border: 2px solid white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.event-popup {
    min-width: 200px;
}

.event-popup strong {
    color: var(--de-primary);
    font-size: 14px;
}

/* Accommodation Warning */
.de-warning-panel {
    background: #fff4e5;
    border: 2px solid #ffb900;
    border-radius: var(--de-radius);
    padding: 20px;
    margin: 20px 0;
    display: flex;
    gap: 20px;
}

.warning-icon {
    color: #ffb900;
    font-size: 32px;
}

.warning-content {
    flex: 1;
}

.warning-content h4 {
    margin: 0 0 10px 0;
    color: var(--de-dark);
}

.warning-content p {
    margin: 8px 0;
    color: #666;
}

.warning-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

/* Accommodation Grid */
.accommodation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* Loading Spinner */
.de-loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

.de-loading .dashicons {
    font-size: 24px;
    margin-right: 10px;
}

.spinning {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.accommodation-card {
    background: white;
    border: 1px solid var(--de-border);
    border-radius: var(--de-radius);
    padding: 15px;
    position: relative;
    transition: all 0.3s;
}

.accommodation-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.accommodation-card.featured {
    border-color: #f0b849;
    background: #fffef5;
}

.accommodation-card.selected {
    border-color: var(--de-success);
    background: #f0fdf4;
}

.featured-badge {
    position: absolute;
    top: -10px;
    right: 10px;
    background: #f0b849;
    color: #000;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.accommodation-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: var(--de-radius) var(--de-radius) 0 0;
    margin: -15px -15px 15px -15px;
}

.accommodation-details {
    padding: 0;
}

.accommodation-card h5 {
    margin: 0 0 10px 0;
    font-size: 18px;
    color: var(--de-dark);
    font-weight: 600;
}

.accommodation-card p {
    margin: 8px 0;
    font-size: 14px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 5px;
}

.accommodation-card p i {
    color: var(--de-primary);
    font-size: 16px;
}

.accommodation-phone a {
    color: var(--de-primary);
    text-decoration: none;
}

.accommodation-phone a:hover {
    text-decoration: underline;
}

.accommodation-actions {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.accommodation-actions .de-btn {
    flex: 1;
    min-width: 120px;
}

/* Itinerary Items - Fixed Display */
.itinerary-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: white;
    border: 1px solid var(--de-border);
    border-radius: var(--de-radius);
    margin-bottom: 10px;
}

.item-number {
    background: var(--de-primary);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

.item-content {
    flex: 1;
}

.item-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--de-dark);
    margin-bottom: 5px;
}

.item-details {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: #666;
}

.item-time {
    display: flex;
    align-items: center;
    gap: 5px;
}

.item-location {
    display: flex;
    align-items: center;
    gap: 5px;
}

.remove-item {
    background: transparent;
    border: none;
    color: #dc3232;
    cursor: pointer;
    font-size: 20px;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-item:hover {
    background: #fee;
    border-radius: 50%;
}

/* Visible Events Counter */
.visible-events-count {
    background: var(--de-light);
    padding: 10px 15px;
    border-radius: var(--de-radius);
    text-align: center;
    margin: 15px 0;
    font-size: 14px;
    color: var(--de-secondary);
}

/* Event Grid Layout */
.de-events-grid {
    display: grid;
    gap: 20px;
    margin: 20px 0;
}

.de-events-grid[data-columns="1"] {
    grid-template-columns: 1fr;
}

.de-events-grid[data-columns="2"] {
    grid-template-columns: repeat(2, 1fr);
}

.de-events-grid[data-columns="3"] {
    grid-template-columns: repeat(3, 1fr);
}

.de-events-grid[data-columns="4"] {
    grid-template-columns: repeat(4, 1fr);
}

/* Event Card Base - Matching Business Card */
.de-event-card {
    background: #fff;
    border: 1px solid var(--de-border);
    border-radius: var(--de-radius);
    box-shadow: var(--de-shadow);
    transition: all 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.de-event-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.de-card-inner {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Event Card Image Section */
.de-card-image-section {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--de-light);
    border-bottom: 1px solid var(--de-border);
    overflow: hidden;
    position: relative;
}

.de-card-image-section img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.de-card-image-section .de-no-image {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 14px;
}

.de-card-image-section .de-no-image i {
    font-size: 48px;
    margin-bottom: 10px;
    opacity: 0.3;
}

/* Event Status Badge */
.de-event-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    z-index: 5;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.de-event-badge.upcoming {
    color: var(--de-success);
}

.de-event-badge.today {
    color: var(--de-warning);
    background: #fff3cd;
}

.de-event-badge.past {
    color: var(--de-secondary);
    opacity: 0.7;
}

/* Event Card Content */
.de-card-header {
    margin-bottom: 15px;
}

.de-event-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--de-dark);
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.de-event-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.de-event-title a:hover {
    color: var(--de-primary);
}

.de-event-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 14px;
    color: var(--de-secondary);
}

.de-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.de-meta-item i {
    width: 16px;
    color: var(--de-primary);
    opacity: 0.7;
}

.de-event-description {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin: 15px 0;
    flex: 1;
}

/* Buttons - Matching Business Directory Style */
.de-btn {
    display: inline-block;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: var(--de-radius);
    cursor: pointer;
    transition: all 0.3s ease;
}

.de-btn-sm {
    padding: 5px 12px;
    font-size: 13px;
}

.de-btn-primary {
    background: var(--de-primary);
    color: #fff;
    border-color: var(--de-primary);
}

.de-btn-primary:hover {
    background: #135e96;
    border-color: #135e96;
    color: #fff;
    text-decoration: none;
}

.de-btn-secondary {
    background: var(--de-secondary);
    color: #fff;
    border-color: var(--de-secondary);
}

.de-btn-secondary:hover {
    background: #333;
    border-color: #333;
    color: #fff;
    text-decoration: none;
}

.de-btn-outline {
    background: transparent;
    color: var(--de-primary);
    border-color: var(--de-primary);
}

.de-btn-outline:hover {
    background: var(--de-primary);
    color: #fff;
    text-decoration: none;
}

.de-btn-block {
    display: block;
    width: 100%;
}

/* Card Footer Actions */
.de-card-footer {
    padding-top: 15px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
    justify-content: space-between;
}

.de-btn-view-more {
    flex: 1;
    background: var(--de-primary);
    color: #fff;
    padding: 10px 16px;
    text-align: center;
    border-radius: var(--de-radius);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.de-btn-view-more:hover {
    background: #135e96;
    transform: translateX(2px);
    color: #fff;
}

.de-btn-view-more i {
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.de-btn-view-more:hover i {
    transform: translateX(3px);
}

/* Action Buttons (Call, Directions, etc.) */
.de-btn-call,
.de-btn-directions,
.de-btn-website {
    flex: 1;
    padding: 8px 12px;
    font-size: 13px;
    border-radius: var(--de-radius);
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.de-btn-call {
    background: var(--de-success);
    color: #fff;
    border: 1px solid var(--de-success);
}

.de-btn-call:hover {
    background: #3a9b47;
    border-color: #3a9b47;
    color: #fff;
}

.de-btn-directions {
    background: var(--de-primary);
    color: #fff;
    border: 1px solid var(--de-primary);
}

.de-btn-directions:hover {
    background: #135e96;
    border-color: #135e96;
    color: #fff;
}

.de-btn-website {
    background: transparent;
    color: var(--de-primary);
    border: 1px solid var(--de-primary);
}

.de-btn-website:hover {
    background: var(--de-primary);
    color: #fff;
}

/* Calendar Styles */
.de-calendar-wrapper {
    background: #fff;
    border: 1px solid var(--de-border);
    border-radius: var(--de-radius);
    padding: 20px;
    margin: 20px 0;
}

.de-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--de-light);
}

.de-calendar-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--de-dark);
}

.de-calendar-nav {
    display: flex;
    gap: 10px;
}

.de-calendar-nav button {
    padding: 6px 12px;
    background: var(--de-light);
    border: 1px solid var(--de-border);
    border-radius: var(--de-radius);
    cursor: pointer;
    transition: all 0.3s ease;
}

.de-calendar-nav button:hover {
    background: var(--de-primary);
    color: #fff;
    border-color: var(--de-primary);
}

/* Calendar Grid */
.de-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: var(--de-border);
    border: 1px solid var(--de-border);
}

.de-calendar-day-header {
    background: var(--de-light);
    padding: 10px;
    text-align: center;
    font-weight: 600;
    font-size: 13px;
    color: var(--de-secondary);
}

.de-calendar-day {
    background: #fff;
    min-height: 80px;
    padding: 8px;
    position: relative;
}

.de-calendar-day-number {
    font-size: 14px;
    font-weight: 500;
    color: var(--de-dark);
    margin-bottom: 5px;
}

.de-calendar-day.other-month .de-calendar-day-number {
    color: #ccc;
}

.de-calendar-day.today {
    background: #fff3cd;
}

.de-calendar-event {
    font-size: 11px;
    padding: 2px 4px;
    background: var(--de-primary);
    color: #fff;
    border-radius: 2px;
    margin-bottom: 2px;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.de-calendar-event:hover {
    background: #135e96;
}

/* Event List View */
.de-event-list {
    background: #fff;
    border: 1px solid var(--de-border);
    border-radius: var(--de-radius);
    overflow: hidden;
}

.de-event-list-item {
    padding: 20px;
    border-bottom: 1px solid var(--de-light);
    transition: background 0.3s ease;
}

.de-event-list-item:hover {
    background: var(--de-light);
}

.de-event-list-item:last-child {
    border-bottom: none;
}

.de-list-content {
    display: flex;
    gap: 20px;
}

.de-list-date {
    min-width: 80px;
    text-align: center;
    padding: 10px;
    background: var(--de-light);
    border-radius: var(--de-radius);
}

.de-list-date-day {
    font-size: 24px;
    font-weight: bold;
    color: var(--de-primary);
    line-height: 1;
}

.de-list-date-month {
    font-size: 12px;
    text-transform: uppercase;
    color: var(--de-secondary);
    margin-top: 5px;
}

.de-list-details {
    flex: 1;
}

.de-list-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.de-list-title a {
    color: var(--de-dark);
    text-decoration: none;
}

.de-list-title a:hover {
    color: var(--de-primary);
}

.de-list-meta {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: var(--de-secondary);
    margin-bottom: 10px;
}

.de-list-description {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

/* Filters */
.de-filters {
    background: #fff;
    border: 1px solid var(--de-border);
    border-radius: var(--de-radius);
    padding: 20px;
    margin-bottom: 20px;
}

.de-filter-row {
    display: flex;
    gap: 15px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.de-filter-group {
    flex: 1;
    min-width: 200px;
}

.de-filter-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 5px;
    color: var(--de-dark);
}

.de-filter-group select,
.de-filter-group input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--de-border);
    border-radius: var(--de-radius);
    font-size: 14px;
}

.de-filter-submit {
    padding: 8px 20px;
    background: var(--de-primary);
    color: #fff;
    border: none;
    border-radius: var(--de-radius);
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease;
}

.de-filter-submit:hover {
    background: #135e96;
}

/* No Results */
.de-no-results {
    text-align: center;
    padding: 40px;
    background: #fff;
    border: 1px solid var(--de-border);
    border-radius: var(--de-radius);
}

.de-no-results i {
    font-size: 48px;
    color: #ccc;
    margin-bottom: 20px;
    display: block;
}

.de-no-results h3 {
    font-size: 18px;
    color: #666;
    margin-bottom: 10px;
}

.de-no-results p {
    color: #888;
    font-size: 14px;
}

/* Loading State */
.de-loading {
    text-align: center;
    padding: 40px;
}

.de-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid var(--de-light);
    border-top-color: var(--de-primary);
    border-radius: 50%;
    animation: de-spin 0.8s linear infinite;
}

@keyframes de-spin {
    to { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .de-events-grid[data-columns="2"],
    .de-events-grid[data-columns="3"],
    .de-events-grid[data-columns="4"] {
        grid-template-columns: 1fr;
    }
    
    .de-filter-row {
        flex-direction: column;
    }
    
    .de-filter-group {
        width: 100%;
    }
    
    .de-card-footer {
        flex-direction: column;
    }
    
    .de-btn-call,
    .de-btn-directions,
    .de-btn-website {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .dayboro-events-container {
        padding: 10px;
    }
    
    .de-calendar-grid {
        font-size: 12px;
    }
    
    .de-calendar-day {
        min-height: 60px;
        padding: 4px;
    }
    
    .de-calendar-event {
        font-size: 10px;
    }
}