/**
 * Iron County Events - CSS Styles
 * Matches the design from screenshot with stacked event cards
 */

/* Container */
.iron-county-events-container {
    max-width: 100%;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Individual Event Card */
.ice-event-card {
    display: flex;
    align-items: flex-start;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    padding: 20px;
    gap: 20px;
    transition: box-shadow 0.2s ease;
}

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

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

/* Event Image/Logo */
.ice-event-image {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    background-color: #f5f5f5;
}

.ice-event-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Event Content */
.ice-event-content {
    flex: 1;
    min-width: 0;
}

.ice-event-title {
    font-size: 24px;
    font-weight: 700;
    color: #333333;
    margin: 0 0 12px 0;
    line-height: 1.2;
}

.ice-event-description {
    font-size: 16px;
    color: #666666;
    line-height: 1.4;
    margin-bottom: 8px;
}

.ice-event-website {
    margin-top: 8px;
}

.ice-website-link {
    color: #0066cc;
    text-decoration: none;
    font-size: 16px;
}

.ice-website-link:hover {
    text-decoration: underline;
}

/* Event Meta Information */
.ice-event-meta {
    flex-shrink: 0;
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 140px;
}

.ice-event-datetime {
    line-height: 1.3;
}

.ice-event-date {
    font-size: 18px;
    font-weight: 600;
    color: #333333;
    margin-bottom: 4px;
}

.ice-event-time {
    font-size: 16px;
    color: #666666;
}

.ice-event-price {
    font-size: 16px;
    font-weight: 600;
    color: #333333;
}

.ice-event-price.ice-free {
    color: #2d8f47;
}

/* Join The Fun Button */
.ice-join-btn {
    display: inline-block;
    background-color: #dc3545;
    color: #ffffff !important;
    padding: 12px 24px;
    border-radius: 24px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: background-color 0.2s ease, transform 0.1s ease;
    text-align: center;
    border: none;
    cursor: pointer;
}

.ice-join-btn:hover {
    background-color: #c82333;
    text-decoration: none;
    transform: translateY(-1px);
}

.ice-join-btn:active {
    transform: translateY(0);
}

/* Error and No Events Messages */
.ice-error {
    background-color: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #f5c6cb;
    margin: 20px 0;
}

.ice-no-events {
    background-color: #d1ecf1;
    color: #0c5460;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #bee5eb;
    margin: 20px 0;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ice-event-card {
        flex-direction: column;
        padding: 16px;
        gap: 16px;
    }
    
    .ice-event-image {
        align-self: center;
        width: 100px;
        height: 100px;
    }
    
    .ice-event-meta {
        text-align: center;
        min-width: auto;
    }
    
    .ice-event-title {
        font-size: 20px;
        text-align: center;
    }
    
    .ice-event-description {
        text-align: center;
    }
    
    .ice-event-datetime {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .ice-event-card {
        padding: 12px;
        margin-bottom: 16px;
    }
    
    .ice-event-image {
        width: 80px;
        height: 80px;
    }
    
    .ice-event-title {
        font-size: 18px;
    }
    
    .ice-event-description {
        font-size: 14px;
    }
    
    .ice-join-btn {
        padding: 10px 20px;
        font-size: 14px;
        width: 100%;
    }
}

/* Loading State */
.ice-loading {
    text-align: center;
    padding: 40px 20px;
    color: #666666;
}

.ice-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #ccc;
    border-top: 2px solid #666;
    border-radius: 50%;
    animation: ice-spin 1s linear infinite;
    margin-left: 10px;
}

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

/* Divi Builder Compatibility */
.et_pb_module .iron-county-events-container {
    width: 100%;
}

.et_pb_module .ice-event-card {
    background: #ffffff;
    border: 1px solid #eee;
}

/* Print Styles */
@media print {
    .ice-join-btn {
        background-color: #333 !important;
        color: #fff !important;
    }
    
    .ice-event-card {
        box-shadow: none;
        border: 1px solid #ccc;
        page-break-inside: avoid;
    }
}