/**
 * Lightweight Bus Event Template Styles
 * 
 * Minimal CSS for fast loading bus event pages
 * Bypasses Divi for better performance
 * 
 * @package CVRSD
 * @since 3.2.4
 */

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
}

body.cvrsd-lightweight-template {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.cvrsd-page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.cvrsd-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* Wide container for overview page */
.cvrsd-container-wide {
    max-width: 1400px;
}

/* Header */
.cvrsd-header {
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.cvrsd-header .cvrsd-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cvrsd-logo {
    text-decoration: none;
    color: #333;
    font-size: 1.25rem;
    font-weight: bold;
}

.cvrsd-logo-img {
    max-height: 50px;
    width: auto;
}

.cvrsd-back-link {
    color: #0073aa;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.cvrsd-back-link:hover {
    color: #005177;
    text-decoration: underline;
}

/* Main Content */
.cvrsd-main {
    flex: 1;
    padding: 30px 0;
}

/* Event Header */
.cvrsd-event-header {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.cvrsd-event-title {
    margin: 0 0 20px;
    font-size: 1.75rem;
    color: #222;
}

.cvrsd-event-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.cvrsd-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
}

.cvrsd-meta-icon {
    font-size: 1.2em;
}

.cvrsd-meta-text {
    font-size: 0.95rem;
}

/* Ticket Section */
.cvrsd-ticket-section {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.cvrsd-section-title {
    margin: 0 0 20px;
    font-size: 1.35rem;
    color: #222;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

/* Event Description */
.cvrsd-event-description {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.cvrsd-content {
    color: #555;
}

.cvrsd-content p:last-child {
    margin-bottom: 0;
}

/* Notice Box */
.cvrsd-notice {
    background: linear-gradient(135deg, #fff9e6 0%, #fff5d6 100%);
    border: 1px solid #ffc107;
    border-left: 4px solid #ffc107;
    border-radius: 8px;
    padding: 20px 25px;
    margin-bottom: 25px;
}

.cvrsd-notice h3 {
    margin: 0 0 12px;
    font-size: 1.1rem;
    color: #856404;
}

.cvrsd-notice ul {
    margin: 0;
    padding-left: 20px;
    color: #856404;
}

.cvrsd-notice li {
    margin-bottom: 6px;
}

.cvrsd-notice li:last-child {
    margin-bottom: 0;
}

/* Footer */
.cvrsd-footer {
    background: #333;
    color: #fff;
    padding: 20px 0;
    text-align: center;
    margin-top: auto;
}

.cvrsd-footer p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Responsive */
@media (max-width: 600px) {
    .cvrsd-container {
        padding: 0 15px;
    }
    
    .cvrsd-header .cvrsd-container {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .cvrsd-event-header,
    .cvrsd-ticket-section,
    .cvrsd-event-description {
        padding: 20px;
        border-radius: 8px;
    }
    
    .cvrsd-event-title {
        font-size: 1.4rem;
    }
    
    .cvrsd-event-meta {
        flex-direction: column;
        gap: 10px;
    }
}

/* =====================================================
   Bus Tickets Form Overrides (for lightweight template)
   ===================================================== */

/* Ensure ticket form looks good without Divi styles */
.cvrsd-lightweight-template .cvrsd-bus-tickets-form {
    font-family: inherit;
}

.cvrsd-lightweight-template .cvrsd-tickets-availability {
    background: #e8f5e9;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 20px;
    font-weight: 500;
}

.cvrsd-lightweight-template .cvrsd-tickets-availability.cvrsd-low-stock {
    background: #fff3e0;
}

.cvrsd-lightweight-template .cvrsd-tickets-availability.cvrsd-sold-out {
    background: #ffebee;
}

.cvrsd-lightweight-template .cvrsd-ticket-row {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 15px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.cvrsd-lightweight-template .cvrsd-ticket-name {
    font-weight: 600;
    font-size: 1.05rem;
    color: #333;
}

.cvrsd-lightweight-template .cvrsd-ticket-price {
    color: #2e7d32;
    font-weight: 600;
    font-size: 1.1rem;
}

.cvrsd-lightweight-template .cvrsd-ticket-qty {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cvrsd-lightweight-template .cvrsd-ticket-qty input[type="number"] {
    width: 70px;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
    text-align: center;
}

.cvrsd-lightweight-template .cvrsd-add-to-cart-btn,
.cvrsd-lightweight-template .cvrsd-tickets-submit {
    background: #2e7d32;
    color: #fff;
    border: none;
    padding: 14px 28px;
    font-size: 1.05rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    width: 100%;
    margin-top: 10px;
}

.cvrsd-lightweight-template .cvrsd-add-to-cart-btn:hover,
.cvrsd-lightweight-template .cvrsd-tickets-submit:hover {
    background: #1b5e20;
    transform: translateY(-1px);
}

.cvrsd-lightweight-template .cvrsd-add-to-cart-btn:active,
.cvrsd-lightweight-template .cvrsd-tickets-submit:active {
    transform: translateY(0);
}

.cvrsd-lightweight-template .cvrsd-add-to-cart-btn:disabled,
.cvrsd-lightweight-template .cvrsd-tickets-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Loading state */
.cvrsd-lightweight-template .cvrsd-loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Messages */
.cvrsd-lightweight-template .cvrsd-message {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 15px;
}

.cvrsd-lightweight-template .cvrsd-message-success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

.cvrsd-lightweight-template .cvrsd-message-error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ef9a9a;
}

/* WooCommerce Notices (if any) */
.cvrsd-lightweight-template .woocommerce-message,
.cvrsd-lightweight-template .woocommerce-error,
.cvrsd-lightweight-template .woocommerce-info {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 15px;
    list-style: none;
}

.cvrsd-lightweight-template .woocommerce-message {
    background: #e8f5e9;
    border-left: 4px solid #4caf50;
}

.cvrsd-lightweight-template .woocommerce-error {
    background: #ffebee;
    border-left: 4px solid #f44336;
}

.cvrsd-lightweight-template .woocommerce-info {
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
}

/* =====================================================
   Bus Overview Page Styles
   ===================================================== */

.cvrsd-bus-overview-page .cvrsd-page-header {
    text-align: center;
    margin-bottom: 30px;
}

.cvrsd-bus-overview-page .cvrsd-page-title {
    font-size: 2rem;
    margin: 0;
    color: #222;
}

.cvrsd-bus-overview-page .cvrsd-bus-grid-section {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.cvrsd-bus-overview-page .cvrsd-notice-info {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border: 1px solid #2196f3;
    border-left: 4px solid #2196f3;
}

.cvrsd-bus-overview-page .cvrsd-notice-info h3 {
    color: #1565c0;
}

.cvrsd-bus-overview-page .cvrsd-notice-info ul {
    color: #1565c0;
}

/* Ensure bus grid looks good in lightweight template */
.cvrsd-lightweight-template .cvrsd-bus-grid {
    display: grid;
    gap: 20px;
}

@media (min-width: 768px) {
    .cvrsd-bus-overview-page .cvrsd-page-title {
        font-size: 2.5rem;
    }
}
