/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.tf-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Event Information Section */
.tf-event-info-section {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.tf-event-header {
    margin-bottom: 20px;
}

.tf-event-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 15px;
}

.tf-event-meta {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    color: #666;
    font-size: 1.1rem;
}

.tf-event-meta i {
    margin-right: 8px;
    color: #3498db;
}

.tf-event-description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
}

/* Tickets Section */
.tf-tickets-section {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.tf-section-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 25px;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.tf-tickets-container {
    display: grid;
    gap: 20px;
}

/* Ticket/Package Cards */
.tf-ticket-card {
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 25px;
    transition: all 0.3s ease;
    background: white;
}

.tf-ticket-card:hover {
    border-color: #3498db;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.tf-ticket-card.tf-disabled {
    opacity: 0.6;
    background-color: #f8f9fa;
    cursor: not-allowed;
}

.tf-ticket-card.tf-disabled:hover {
    transform: none;
    border-color: #e9ecef;
}

.tf-ticket-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.tf-ticket-title-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tf-ticket-icon {
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: white;
}

.tf-ticket-icon.tf-admission {
    background-color: #3498db;
}

.tf-ticket-icon.tf-parking {
    background-color: #f39c12;
}

.tf-ticket-icon.tf-package {
    background-color: #9b59b6;
}

.tf-ticket-icon.tf-combo {
    background: linear-gradient(45deg, #3498db, #f39c12);
}

.tf-ticket-name {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2c3e50;
}

.tf-ticket-price {
    font-size: 1.4rem;
    font-weight: 700;
    color: #27ae60;
}

.tf-ticket-description {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
}

.tf-ticket-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.tf-ticket-status.tf-available {
    background-color: #d4edda;
    color: #155724;
}

.tf-ticket-status.tf-sold-out {
    background-color: #f8d7da;
    color: #721c24;
}

.tf-ticket-status.tf-not-active {
    background-color: #fff3cd;
    color: #856404;
}

/* Quantity Controls */
.tf-quantity-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 15px;
}

.tf-quantity-selector {
    display: flex;
    align-items: center;
    gap: 15px;
}

.tf-quantity-btn {
    width: 40px;
    height: 40px;
    border: 2px solid #3498db;
    background: white;
    color: #3498db;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.tf-quantity-btn:hover:not(:disabled) {
    background: #3498db;
    color: white;
}

.tf-quantity-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.tf-quantity-display {
    font-size: 1.2rem;
    font-weight: 600;
    min-width: 30px;
    text-align: center;
}

.tf-add-to-cart {
    background: #27ae60;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tf-add-to-cart:hover:not(:disabled) {
    background: #229954;
    transform: translateY(-1px);
}

.tf-add-to-cart:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    transform: none;
}

/* Package Event Selection */
.tf-package-events-required {
    background: #e8f4fd;
    border: 1px solid #3498db;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
}

.tf-package-events-required h4 {
    color: #2980b9;
    margin-bottom: 10px;
    font-size: 1rem;
}

.tf-selected-events {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.tf-selected-event-tag {
    background: #3498db;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.tf-remove-event {
    cursor: pointer;
    font-weight: bold;
}

/* Cart Section */
.tf-cart-section {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 20px;
}

.tf-cart-items {
    margin-bottom: 20px;
}

.tf-cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.tf-cart-item:last-child {
    border-bottom: none;
}

.tf-cart-item-name {
    font-weight: 600;
}

.tf-cart-item-details {
    font-size: 0.9rem;
    color: #666;
}

.tf-cart-item-price {
    font-weight: 600;
    color: #27ae60;
}

.tf-empty-cart {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 20px 0;
}

.tf-cart-total {
    border-top: 2px solid #3498db;
    padding-top: 15px;
    font-size: 1.3rem;
    font-weight: 700;
    text-align: right;
}

.tf-total-amount {
    color: #27ae60;
}

.tf-checkout-btn {
    width: 100%;
    background: #e74c3c;
    color: white;
    border: none;
    padding: 15px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.tf-checkout-btn:hover:not(:disabled) {
    background: #c0392b;
    transform: translateY(-1px);
}

.tf-checkout-btn:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    transform: none;
}

/* Modal Styles */
.tf-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.tf-modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.tf-modal-header {
    padding: 20px 30px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tf-modal-header h3 {
    margin: 0;
    color: #2c3e50;
}

.tf-close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.tf-close:hover {
    color: #000;
}

.tf-modal-body {
    padding: 30px;
}

.tf-available-events {
    display: grid;
    gap: 15px;
    margin-top: 20px;
}

.tf-event-option {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tf-event-option:hover {
    border-color: #3498db;
}

.tf-event-option.tf-selected {
    border-color: #3498db;
    background-color: #e8f4fd;
}

.tf-event-option.tf-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.tf-event-option-name {
    font-weight: 600;
    margin-bottom: 5px;
}

.tf-event-option-date {
    color: #666;
    font-size: 0.9rem;
}

.tf-modal-footer {
    padding: 20px 30px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

.tf-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.tf-btn-primary {
    background: #3498db;
    color: white;
}

.tf-btn-primary:hover {
    background: #2980b9;
}

.tf-btn-secondary {
    background: #95a5a6;
    color: white;
}

.tf-btn-secondary:hover {
    background: #7f8c8d;
}

.tf-modal-error {
    background: #f8d7da;
    color: #721c24;
    padding: 10px;
    border-radius: 6px;
    margin-top: 15px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .tf-container {
        padding: 10px;
    }
    
    /* Event Section Mobile */
    .tf-event-info-section,
    .tf-tickets-section,
    .tf-cart-section {
        padding: 20px;
        margin-bottom: 20px;
        border-radius: 8px;
    }
    
    .tf-event-title {
        font-size: 1.8rem;
        line-height: 1.2;
    }
    
    .tf-event-meta {
        flex-direction: column;
        gap: 12px;
        font-size: 1rem;
    }
    
    .tf-section-title {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }
    
    /* Ticket Cards Mobile */
    .tf-ticket-card {
        padding: 18px;
        margin-bottom: 15px;
    }
    
    .tf-ticket-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 12px;
    }
    
    .tf-ticket-title-section {
        width: 100%;
    }
    
    .tf-ticket-name {
        font-size: 1.2rem;
        line-height: 1.3;
    }
    
    .tf-ticket-price {
        font-size: 1.3rem;
        margin-top: 8px;
    }
    
    .tf-ticket-description {
        font-size: 0.95rem;
        margin-bottom: 15px;
    }
    
    /* Quantity Controls Mobile */
    .tf-quantity-controls {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .tf-quantity-selector {
        justify-content: center;
        gap: 20px;
    }
    
    .tf-quantity-btn {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
        /* Better touch targets */
        min-height: 44px;
        min-width: 44px;
    }
    
    .tf-quantity-display {
        font-size: 1.3rem;
        min-width: 40px;
    }
    
    .tf-add-to-cart {
        padding: 15px 20px;
        font-size: 1.1rem;
        min-height: 48px; /* Better touch target */
    }
    
    /* Package Info Mobile */
    .tf-package-events-required {
        padding: 12px;
        margin: 12px 0;
    }
    
    .tf-package-events-required h4 {
        font-size: 0.95rem;
    }
    
    /* Cart Section Mobile */
    .tf-cart-section {
        position: static; /* Remove sticky on mobile */
        margin-top: 20px;
    }
    
    .tf-cart-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 15px 0;
    }
    
    .tf-cart-item-details {
        font-size: 0.85rem;
        line-height: 1.4;
    }
    
    .tf-cart-item-price {
        align-self: flex-end;
        font-size: 1.1rem;
    }
    
    .tf-cart-total {
        font-size: 1.2rem;
        padding-top: 12px;
    }
    
    .tf-checkout-btn {
        padding: 18px;
        font-size: 1.2rem;
        min-height: 50px; /* Better touch target */
    }
    
    /* Modal Mobile */
    .tf-modal-content {
        margin: 5% auto;
        width: 95%;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .tf-modal-header,
    .tf-modal-body,
    .tf-modal-footer {
        padding: 20px;
    }
    
    .tf-modal-header h3 {
        font-size: 1.3rem;
        line-height: 1.3;
        margin-right: 15px;
    }
    
    .tf-close {
        font-size: 32px;
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .tf-event-option {
        padding: 18px;
        border-width: 2px;
    }
    
    .tf-event-option-name {
        font-size: 1.1rem;
        margin-bottom: 8px;
    }
    
    .tf-event-option-date {
        font-size: 0.9rem;
    }
    
    .tf-modal-footer {
        flex-direction: column;
        gap: 12px;
    }
    
    .tf-btn {
        padding: 15px 20px;
        font-size: 1.1rem;
        min-height: 48px;
    }
    
    /* Selected event tags mobile */
    .tf-selected-event-tag {
        padding: 6px 12px;
        font-size: 0.9rem;
    }
}

/* Tablet specific adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
    .tf-container {
        padding: 20px;
    }
    
    .tf-tickets-container {
        display: grid;
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .tf-event-title {
        font-size: 2.2rem;
    }
    
    .tf-ticket-card {
        padding: 22px;
    }
}

/* Large screens - show tickets in grid */
@media (min-width: 1200px) {
    .tf-tickets-container {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
        gap: 25px;
    }
}

/* Touch device improvements */
@media (hover: none) and (pointer: coarse) {
    /* Remove hover effects on touch devices */
    .tf-ticket-card:hover {
        transform: none;
        border-color: #e9ecef;
    }
    
    .tf-quantity-btn:hover:not(:disabled) {
        background: white;
        color: #3498db;
    }
    
    .tf-add-to-cart:hover:not(:disabled) {
        background: #27ae60;
        transform: none;
    }
    
    .tf-checkout-btn:hover:not(:disabled) {
        background: #e74c3c;
        transform: none;
    }
    
    /* Increase touch targets */
    .tf-quantity-btn,
    .tf-add-to-cart,
    .tf-checkout-btn,
    .tf-close {
        min-height: 44px;
        min-width: 44px;
    }
}
