/* ========================================
   Tour Booking Plugin - Modern Public Styles
   CSS3 + Animations + Better Typography
   ======================================== */

:root {
    /* Colors */
    --tb-primary: #f0a500;
    --tb-primary-dark: #d4910a;
    --tb-primary-light: #fff4e6;
    --tb-secondary: #1a1a2e;
    --tb-secondary-light: #2d2d4d;
    --tb-accent: #00d4ff;
    --tb-text: #333;
    --tb-text-light: #666;
    --tb-text-lighter: #999;
    --tb-light: #f8f9fa;
    --tb-lighter: #fafbfc;
    --tb-border: #e0e0e0;
    --tb-border-light: #efefef;
    
    /* Success colors */
    --tb-success: #10b981;
    --tb-success-light: #d1fae5;
    --tb-success-dark: #059669;
    
    /* Warning colors */
    --tb-warning: #f59e0b;
    --tb-warning-light: #fef3c7;
    --tb-warning-dark: #d97706;
    
    /* Danger colors */
    --tb-danger: #ef4444;
    --tb-danger-light: #fee2e2;
    --tb-danger-dark: #dc2626;
    
    /* Spacing */
    --tb-space-xs: 4px;
    --tb-space-sm: 8px;
    --tb-space-md: 12px;
    --tb-space-lg: 16px;
    --tb-space-xl: 20px;
    --tb-space-2xl: 24px;
    
    /* Border radius */
    --tb-radius-sm: 4px;
    --tb-radius: 8px;
    --tb-radius-lg: 12px;
    --tb-radius-xl: 16px;
    
    /* Shadow */
    --tb-shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --tb-shadow: 0 2px 15px rgba(0,0,0,0.1);
    --tb-shadow-lg: 0 10px 40px rgba(0,0,0,0.15);
    --tb-shadow-hover: 0 8px 30px rgba(0,0,0,0.15);
    
    /* Transitions */
    --tb-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --tb-transition-fast: all 0.2s ease-in-out;
}

* {
    box-sizing: border-box;
}

/* ========================================
   Animations
   ======================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-4px);
    }
}

@keyframes glow {
    0% {
        box-shadow: 0 0 0 0 rgba(240, 165, 0, 0.4);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(240, 165, 0, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(240, 165, 0, 0);
    }
}

.tb-fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

.tb-slide-up {
    animation: slideUp 0.4s ease-out;
}

.tb-pulse {
    animation: pulse 0.6s ease-in-out;
}

.tb-pulse-border {
    animation: glow 0.6s ease-out;
}

/* ========================================
   Booking Form - Main Container
   ======================================== */

.tb-booking-wrap {
    background: #fff;
    border: 1px solid var(--tb-border);
    border-radius: var(--tb-radius-lg);
    padding: 0;
    margin-bottom: var(--tb-space-xl);
    overflow: hidden;
    box-shadow: var(--tb-shadow);
    transition: var(--tb-transition);
    animation: slideUp 0.5s ease-out;
}

.tb-booking-wrap:hover {
    box-shadow: var(--tb-shadow-lg);
}

/* ========================================
   Booking Header
   ======================================== */

.tb-booking-header {
    background: linear-gradient(135deg, var(--tb-secondary) 0%, var(--tb-secondary-light) 100%);
    color: #fff;
    padding: var(--tb-space-xl);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--tb-space-lg);
    position: relative;
    overflow: hidden;
}

.tb-booking-header::before {
    content: '';
    position: absolute;
    top: 0;
    right: -50%;
    width: 200%;
    height: 100%;
    background: radial-gradient(circle at 30% 50%, rgba(255,255,255,0.1) 0%, transparent 100%);
    pointer-events: none;
}

.tb-price-wrap {
    display: flex;
    align-items: baseline;
    gap: var(--tb-space-sm);
    z-index: 1;
}

.tb-price-from {
    font-size: 12px;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tb-price-amount {
    font-size: 32px;
    font-weight: 700;
    color: var(--tb-primary);
    letter-spacing: -0.5px;
}

.tb-price-amount .woocommerce-Price-currencySymbol {
    font-size: 18px;
    margin-right: 2px;
}

.tb-price-label {
    font-size: 13px;
    opacity: 0.85;
    font-weight: 500;
}

.tb-duration {
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: var(--tb-space-sm);
    opacity: 0.9;
    background: rgba(255,255,255,0.1);
    padding: var(--tb-space-sm) var(--tb-space-md);
    border-radius: var(--tb-radius);
    z-index: 1;
}

.tb-duration .dashicons {
    width: 18px;
    height: 18px;
    font-size: 18px;
}

/* ========================================
   Meta Row
   ======================================== */

.tb-meta-row {
    padding: var(--tb-space-lg) var(--tb-space-xl);
    border-bottom: 1px solid var(--tb-border);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: var(--tb-space-md);
    background: linear-gradient(to right, var(--tb-lighter), #fff);
    transition: var(--tb-transition-fast);
}

.tb-meta-row:hover {
    background: var(--tb-light);
}

.tb-meta-row .dashicons {
    color: var(--tb-primary);
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.tb-meta-row strong {
    color: var(--tb-secondary);
    font-weight: 600;
}

/* ========================================
   Booking Form Fields
   ======================================== */

.tb-booking-form {
    padding: var(--tb-space-xl);
}

.tb-form-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 var(--tb-space-xl);
    color: var(--tb-secondary);
    display: flex;
    align-items: center;
    gap: var(--tb-space-sm);
}

.tb-form-group {
    margin-bottom: var(--tb-space-lg);
}

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

.tb-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: var(--tb-space-sm);
    color: var(--tb-text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tb-form-group label .required {
    color: var(--tb-danger);
    font-weight: 700;
    margin-left: 2px;
}

/* ========================================
   Date Input
   ======================================== */

.tb-date-input {
    width: 100%;
    padding: var(--tb-space-md) var(--tb-space-lg);
    border: 2px solid var(--tb-border);
    border-radius: var(--tb-radius);
    font-size: 15px;
    font-family: inherit;
    transition: var(--tb-transition-fast);
    background: #fff;
    color: var(--tb-text);
}

.tb-date-input:hover {
    border-color: var(--tb-primary-light);
    background: var(--tb-lighter);
}

.tb-date-input:focus {
    border-color: var(--tb-primary);
    outline: none;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(240, 165, 0, 0.1);
}

.tb-date-input::placeholder {
    color: var(--tb-text-lighter);
}

/* ========================================
   Quantity Selector
   ======================================== */

.tb-qty-wrap {
    display: flex;
    align-items: stretch;
    border: 2px solid var(--tb-border);
    border-radius: var(--tb-radius);
    overflow: hidden;
    max-width: 180px;
    transition: var(--tb-transition-fast);
    background: #fff;
}

.tb-qty-wrap:hover {
    border-color: var(--tb-primary);
}

.tb-qty-wrap:focus-within {
    border-color: var(--tb-primary);
    box-shadow: 0 0 0 3px rgba(240, 165, 0, 0.1);
}

.tb-qty-btn {
    background: var(--tb-light);
    border: none;
    padding: var(--tb-space-md) var(--tb-space-lg);
    font-size: 18px;
    cursor: pointer;
    transition: var(--tb-transition-fast);
    line-height: 1;
    font-weight: 600;
    color: var(--tb-text);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    user-select: none;
}

.tb-qty-btn:hover {
    background: var(--tb-primary);
    color: #fff;
    transform: scale(1.05);
}

.tb-qty-btn:active {
    transform: scale(0.95);
}

.tb-qty-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.tb-pax-input {
    border: none;
    text-align: center;
    flex: 1;
    font-size: 16px;
    font-weight: 700;
    padding: var(--tb-space-md) var(--tb-space-sm);
    background: transparent;
    color: var(--tb-text);
    font-family: inherit;
}

.tb-pax-input:focus {
    outline: none;
    background: var(--tb-primary-light);
}

.tb-pax-input::-webkit-outer-spin-button,
.tb-pax-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.tb-pax-input[type=number] {
    -moz-appearance: textfield;
}

.tb-qty-hint {
    font-size: 12px;
    color: var(--tb-text-lighter);
    margin: var(--tb-space-sm) 0 0;
    font-style: italic;
}

/* ========================================
   Availability Info
   ======================================== */

.tb-availability-info {
    margin-top: var(--tb-space-md);
    padding: var(--tb-space-md) var(--tb-space-lg);
    border-radius: var(--tb-radius);
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: var(--tb-space-sm);
    animation: slideUp 0.3s ease-out;
}

.tb-availability-info.available {
    background: var(--tb-success-light);
    color: var(--tb-success-dark);
    border: 1px solid var(--tb-success);
}

.tb-availability-info.limited {
    background: var(--tb-warning-light);
    color: var(--tb-warning-dark);
    border: 1px solid var(--tb-warning);
}

.tb-availability-info.full {
    background: var(--tb-danger-light);
    color: var(--tb-danger-dark);
    border: 1px solid var(--tb-danger);
}

/* ========================================
   Price Summary
   ======================================== */

.tb-price-summary {
    background: linear-gradient(135deg, var(--tb-lighter) 0%, var(--tb-light) 100%);
    border-radius: var(--tb-radius-lg);
    padding: var(--tb-space-lg);
    margin-top: var(--tb-space-xl);
    border: 1px solid var(--tb-border);
    animation: slideUp 0.4s ease-out;
}

.tb-summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    margin-bottom: var(--tb-space-md);
    color: var(--tb-text);
}

.tb-summary-row span:last-child {
    font-weight: 600;
}

.tb-summary-total {
    border-top: 2px solid var(--tb-border);
    padding-top: var(--tb-space-md);
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 0;
    color: var(--tb-secondary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tb-summary-total span:last-child {
    color: var(--tb-primary);
    font-size: 18px;
}

/* ========================================
   Include/Exclude
   ======================================== */

.tb-include-exclude {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border-top: 1px solid var(--tb-border);
}

.tb-include,
.tb-exclude {
    padding: var(--tb-space-xl);
}

.tb-include {
    border-right: 1px solid var(--tb-border);
    background: linear-gradient(to bottom, rgba(16, 185, 129, 0.02), transparent);
}

.tb-exclude {
    background: linear-gradient(to bottom, rgba(239, 68, 68, 0.02), transparent);
}

.tb-include h5,
.tb-exclude h5 {
    font-size: 13px;
    font-weight: 700;
    margin: 0 0 var(--tb-space-md);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: var(--tb-space-sm);
}

.tb-include h5 {
    color: var(--tb-success-dark);
}

.tb-exclude h5 {
    color: var(--tb-danger-dark);
}

.tb-include ul,
.tb-exclude ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.tb-include ul li,
.tb-exclude ul li {
    font-size: 13px;
    padding: var(--tb-space-sm) 0;
    color: var(--tb-text);
    display: flex;
    align-items: flex-start;
    gap: var(--tb-space-sm);
}

.tb-include ul li::before {
    content: '✓';
    color: var(--tb-success);
    font-weight: 700;
    flex-shrink: 0;
}

.tb-exclude ul li::before {
    content: '✗';
    color: var(--tb-danger);
    font-weight: 700;
    flex-shrink: 0;
}

/* ========================================
   Tour Grid / Cards
   ======================================== */

.tb-tour-grid {
    display: grid;
    gap: var(--tb-space-2xl);
    margin: var(--tb-space-xl) 0;
}

.tb-cols-1 { grid-template-columns: 1fr; }
.tb-cols-2 { grid-template-columns: repeat(2, 1fr); }
.tb-cols-3 { grid-template-columns: repeat(3, 1fr); }
.tb-cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
    .tb-cols-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .tb-cols-3,
    .tb-cols-4 { grid-template-columns: repeat(2, 1fr); }
    .tb-cols-2 { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .tb-cols-2,
    .tb-cols-3,
    .tb-cols-4 { grid-template-columns: 1fr; }
    .tb-include-exclude { grid-template-columns: 1fr; }
    .tb-include { border-right: none; border-bottom: 1px solid var(--tb-border); }
}

/* ========================================
   Tour Card
   ======================================== */

.tb-tour-card {
    background: #fff;
    border-radius: var(--tb-radius-lg);
    overflow: hidden;
    box-shadow: var(--tb-shadow);
    transition: var(--tb-transition);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.tb-tour-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--tb-shadow-lg);
}

.tb-card-image {
    position: relative;
    overflow: hidden;
    height: 220px;
    flex-shrink: 0;
}

.tb-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--tb-transition);
}

.tb-tour-card:hover .tb-card-image img {
    transform: scale(1.08);
}

.tb-card-category {
    position: absolute;
    top: var(--tb-space-lg);
    left: var(--tb-space-lg);
    background: var(--tb-primary);
    color: #fff;
    padding: var(--tb-space-sm) var(--tb-space-md);
    border-radius: 50px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
    animation: slideUp 0.4s ease-out;
}

.tb-card-duration {
    position: absolute;
    bottom: var(--tb-space-lg);
    right: var(--tb-space-lg);
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    color: #fff;
    padding: var(--tb-space-sm) var(--tb-space-md);
    border-radius: var(--tb-radius-sm);
    font-size: 12px;
    font-weight: 600;
    z-index: 2;
}

.tb-card-body {
    padding: var(--tb-space-lg);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.tb-card-location {
    font-size: 12px;
    color: var(--tb-text-lighter);
    display: flex;
    align-items: center;
    gap: var(--tb-space-sm);
    margin-bottom: var(--tb-space-md);
}

.tb-card-location::before {
    content: '📍';
}

.tb-card-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 var(--tb-space-md);
    line-height: 1.4;
    flex-grow: 1;
}

.tb-card-title a {
    color: var(--tb-secondary);
    text-decoration: none;
    transition: var(--tb-transition-fast);
}

.tb-card-title a:hover {
    color: var(--tb-primary);
}

.tb-card-rating {
    display: flex;
    align-items: center;
    gap: var(--tb-space-sm);
    margin-bottom: var(--tb-space-md);
    font-size: 13px;
}

.tb-rating-count {
    color: var(--tb-text-lighter);
    font-size: 12px;
}

.tb-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--tb-border);
    padding-top: var(--tb-space-md);
    margin-top: auto;
}

.tb-card-price {
    font-size: 13px;
    color: var(--tb-text);
}

.tb-card-price strong {
    font-size: 18px;
    color: var(--tb-primary);
    font-weight: 700;
}

.tb-card-price .tb-price-from {
    display: block;
    font-size: 11px;
    color: var(--tb-text-lighter);
}

.tb-card-price .tb-price-label {
    font-size: 11px;
    color: var(--tb-text-lighter);
}

/* ========================================
   Buttons
   ======================================== */

.tb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--tb-space-md) var(--tb-space-lg);
    border-radius: var(--tb-radius);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: var(--tb-transition-fast);
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    user-select: none;
}

.tb-btn:active {
    transform: scale(0.98);
}

.tb-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.tb-btn-book {
    background: var(--tb-primary);
    color: #fff;
}

.tb-btn-book:hover:not(:disabled) {
    background: var(--tb-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(240, 165, 0, 0.3);
}

.tb-btn-search {
    background: var(--tb-primary);
    color: #fff;
    padding: var(--tb-space-lg) var(--tb-space-2xl);
    font-size: 15px;
    width: 100%;
}

.tb-btn-search:hover:not(:disabled) {
    background: var(--tb-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(240, 165, 0, 0.4);
}

/* ========================================
   Search Form
   ======================================== */

.tb-search-form {
    background: #fff;
    padding: var(--tb-space-2xl);
    border-radius: var(--tb-radius-lg);
    box-shadow: var(--tb-shadow);
    animation: slideUp 0.5s ease-out;
}

.tb-search-fields {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr auto;
    gap: var(--tb-space-lg);
    align-items: end;
}

.tb-search-field {
    display: flex;
    flex-direction: column;
}

.tb-search-field label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: var(--tb-space-sm);
    color: var(--tb-text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tb-search-field input,
.tb-search-field select {
    width: 100%;
    padding: var(--tb-space-md) var(--tb-space-lg);
    border: 2px solid var(--tb-border);
    border-radius: var(--tb-radius);
    font-size: 14px;
    font-family: inherit;
    transition: var(--tb-transition-fast);
    background: #fff;
}

.tb-search-field input:hover,
.tb-search-field select:hover {
    border-color: var(--tb-primary-light);
}

.tb-search-field input:focus,
.tb-search-field select:focus {
    outline: none;
    border-color: var(--tb-primary);
    box-shadow: 0 0 0 3px rgba(240, 165, 0, 0.1);
}

@media (max-width: 1200px) {
    .tb-search-fields { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
    .tb-search-fields { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
    .tb-search-fields { grid-template-columns: 1fr; }
}

/* ========================================
   Badges
   ======================================== */

.tb-pax-badge {
    background: var(--tb-success-light);
    color: var(--tb-success-dark);
    padding: var(--tb-space-sm) var(--tb-space-md);
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
    display: inline-block;
    border: 1px solid var(--tb-success);
}

/* ========================================
   Variant Selector
   ======================================== */

.tb-variant-select {
    width: 100%;
    padding: var(--tb-space-md) var(--tb-space-lg);
    border: 2px solid var(--tb-border);
    border-radius: var(--tb-radius);
    font-size: 15px;
    background: #fff;
    color: var(--tb-text);
    cursor: pointer;
    transition: var(--tb-transition-fast);
    font-family: inherit;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23666' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

.tb-variant-select:hover {
    border-color: var(--tb-primary-light);
}

.tb-variant-select:focus {
    outline: none;
    border-color: var(--tb-primary);
    box-shadow: 0 0 0 3px rgba(240, 165, 0, 0.1);
}

.tb-variant-select option {
    font-size: 14px;
    padding: var(--tb-space-md);
    color: var(--tb-text);
    background: #fff;
}

.tb-variant-badge {
    display: inline-block;
    background: var(--tb-primary-light);
    color: var(--tb-primary-dark);
    border: 1px solid var(--tb-primary);
    border-radius: var(--tb-radius-sm);
    font-size: 12px;
    font-weight: 700;
    padding: var(--tb-space-sm) var(--tb-space-md);
    margin-top: var(--tb-space-sm);
}

/* ========================================
   Admin Variants Table
   ======================================== */

.tb-variants-table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--tb-space-lg) 0;
}

.tb-variants-table th,
.tb-variants-table td {
    padding: var(--tb-space-md) var(--tb-space-lg);
    border: 1px solid var(--tb-border);
    vertical-align: middle;
    text-align: left;
}

.tb-variants-table thead th {
    background: linear-gradient(to right, var(--tb-light), var(--tb-lighter));
    font-weight: 700;
    font-size: 13px;
    color: var(--tb-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tb-variants-table tbody tr {
    transition: var(--tb-transition-fast);
}

.tb-variants-table tbody tr:hover {
    background: var(--tb-lighter);
}

.tb-variants-table tbody td {
    font-size: 14px;
    color: var(--tb-text);
}

/* ========================================
   Utility Classes
   ======================================== */

.tb-hidden {
    display: none !important;
}

.tb-visible {
    display: block !important;
}

.tb-text-center {
    text-align: center;
}

.tb-text-muted {
    color: var(--tb-text-lighter);
    font-size: 13px;
}

.tb-mt-small { margin-top: var(--tb-space-sm); }
.tb-mt-medium { margin-top: var(--tb-space-md); }
.tb-mt-large { margin-top: var(--tb-space-lg); }

.tb-mb-small { margin-bottom: var(--tb-space-sm); }
.tb-mb-medium { margin-bottom: var(--tb-space-md); }
.tb-mb-large { margin-bottom: var(--tb-space-lg); }

/* ========================================
   Print Styles
   ======================================== */

@media print {
    .tb-booking-wrap {
        box-shadow: none;
        border: 1px solid var(--tb-border);
    }

    .tb-btn {
        display: none;
    }
}
