/* Mega Travel Booking Styles */

/* Trip single page styles */
.mgdv-trip .entry-header {
    margin-bottom: 20px;
}

.mgdv-trip .entry-content {
    margin-bottom: 30px;
    line-height: 1.6;
}

.mgdv-trip .entry-footer {
    padding: 20px 0;
    border-top: 1px solid #eee;
}

/* Check availability button */
#check-availability-btn {
    background: #0073aa;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#check-availability-btn:hover {
    background: #005a87;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 90%;
    max-width: 800px;
    border-radius: 8px;
    max-height: 80vh;
    overflow-y: auto;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover,
.close:focus {
    color: #000;
    text-decoration: none;
}

/* Package section styles */
.package-section {
    border: 1px solid #ddd;
    padding: 20px;
    margin: 15px 0;
    background: #f9f9f9;
    border-radius: 6px;
}

.package-section h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 18px;
}

.package-section h4 {
    margin: 0 0 10px 0;
    color: #555;
    font-size: 16px;
}

/* Grid layout for adult/children sections */
.package-section > div[style*="grid"] {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 15px;
}

/* Form input styles */
.package-section input[type="number"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

.package-section label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

/* Radio button styles */
.package-section input[type="radio"] {
    margin-right: 5px;
}

.package-section label input[type="radio"] {
    display: inline;
    width: auto;
    margin-bottom: 0;
}

/* Price display styles */
.package-section div[style*="font-size: 12px"] {
    font-size: 12px !important;
    color: #666 !important;
    padding: 5px;
    background: #fff;
    border-radius: 3px;
    border: 1px solid #eee;
}

/* Total price section */
.modal-content div[style*="background: #e8f5e8"] {
    margin-top: 20px;
    padding: 15px;
    background: #e8f5e8 !important;
    border: 1px solid #4caf50 !important;
    border-radius: 6px;
    text-align: center;
}

.modal-content div[style*="background: #e8f5e8"] h3 {
    margin: 0;
    color: #2e7d32;
    font-size: 20px;
}

/* Confirm booking button */
#confirm-booking {
    margin-top: 20px;
    background: #4caf50;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 100%;
}

#confirm-booking:hover {
    background: #45a049;
}

#confirm-booking:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Responsive design */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 2% auto;
        padding: 15px;
    }
    
    .package-section > div[style*="grid"] {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .close {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .modal-content {
        width: 98%;
        margin: 1% auto;
        padding: 10px;
    }
    
    .package-section {
        padding: 15px;
    }
    
    #check-availability-btn,
    #confirm-booking {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* Cart and Checkout Page Styles */
.mtb-cart-page,
.mtb-checkout-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.mtb-cart-page h1,
.mtb-checkout-page h1 {
    color: #333;
    margin-bottom: 30px;
    text-align: center;
}

/* Cart Items */
.cart-items {
    margin-bottom: 30px;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 15px;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.cart-item-details {
    flex: 1;
}

.cart-item-details h4 {
    margin: 0 0 5px 0;
    color: #333;
    font-size: 18px;
}

.cart-item-details p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.cart-item-price {
    font-weight: bold;
    color: #2e7d32;
    font-size: 16px;
    margin-right: 15px;
}

.remove-item {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.remove-item:hover {
    background: #c82333;
}

/* Cart Total */
.cart-total {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.cart-total h3 {
    margin: 0 0 15px 0;
    color: #2e7d32;
    font-size: 24px;
}

.checkout-btn {
    background: #28a745;
    color: white;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    transition: background-color 0.3s ease;
    display: inline-block;
}

.checkout-btn:hover {
    background: #218838;
    color: white;
    text-decoration: none;
}

/* Checkout Form */
.checkout-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 20px;
}

.order-summary {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    height: fit-content;
}

.order-summary h3 {
    margin: 0 0 20px 0;
    color: #333;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 10px;
}

.order-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.order-item:last-child {
    border-bottom: none;
}

.order-total {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid #28a745;
    font-size: 18px;
    color: #2e7d32;
}

.checkout-form {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.checkout-form h3 {
    margin: 0 0 20px 0;
    color: #333;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 10px;
}

.form-row {
    margin-bottom: 20px;
}

.form-row label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.form-row input,
.form-row textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-row input:focus,
.form-row textarea:focus {
    outline: none;
    border-color: #28a745;
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.25);
}

.checkout-submit {
    background: #28a745;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 100%;
}

.checkout-submit:hover {
    background: #218838;
}

/* Empty Cart */
.mtb-cart-page p,
.mtb-checkout-page p {
    text-align: center;
    font-size: 16px;
    color: #666;
    margin: 40px 0;
}

.button {
    background: #0073aa;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    transition: background-color 0.3s ease;
    display: inline-block;
}

.button:hover {
    background: #005a87;
    color: white;
    text-decoration: none;
}

/* Booking Confirmation Page Styles */
.mtb-confirmation-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.confirmation-header {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}

.success-icon {
    font-size: 60px;
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.2);
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.confirmation-header h1 {
    margin: 0 0 10px 0;
    font-size: 32px;
    font-weight: 600;
}

.booking-number {
    font-size: 18px;
    opacity: 0.9;
    margin: 0;
    font-weight: 500;
}

.confirmation-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 30px;
}

.confirmation-section {
    padding: 30px;
    border-bottom: 1px solid #eee;
}

.confirmation-section:last-child {
    border-bottom: none;
}

.confirmation-section h3 {
    margin: 0 0 20px 0;
    color: #2c3e50;
    font-size: 20px;
    font-weight: 600;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.info-item {
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #3498db;
}

.booking-items {
    margin-bottom: 20px;
}

.booking-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 15px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.booking-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.item-details h4 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 18px;
    font-weight: 600;
}

.item-details p {
    margin: 5px 0;
    color: #555;
    font-size: 14px;
}

.item-price {
    font-size: 18px;
    font-weight: 600;
    color: #27ae60;
    background: white;
    padding: 10px 15px;
    border-radius: 6px;
    border: 2px solid #27ae60;
}

.booking-total {
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
    box-shadow: 0 3px 10px rgba(231, 76, 60, 0.3);
}

.next-steps {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #27ae60;
}

.next-steps p {
    margin: 10px 0;
    color: #2c3e50;
    font-weight: 500;
    display: flex;
    align-items: center;
}

.next-steps p:before {
    content: "";
    width: 8px;
    height: 8px;
    background: #27ae60;
    border-radius: 50%;
    margin-right: 12px;
    flex-shrink: 0;
}

.confirmation-actions {
    text-align: center;
    padding: 20px;
}

.confirmation-actions .button {
    display: inline-block;
    padding: 12px 30px;
    margin: 0 10px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.button-primary {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    box-shadow: 0 3px 10px rgba(52, 152, 219, 0.3);
}

.button-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

.button-secondary {
    background: white;
    color: #2c3e50;
    border: 2px solid #bdc3c7;
}

.button-secondary:hover {
    background: #f8f9fa;
    border-color: #95a5a6;
    transform: translateY(-1px);
}

.confirmation-error {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.confirmation-error h1 {
    color: #e74c3c;
    margin-bottom: 20px;
    font-size: 28px;
}

.confirmation-error p {
    color: #7f8c8d;
    margin-bottom: 30px;
    font-size: 16px;
}

.confirmation-error .button {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 12px 30px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    transition: all 0.3s ease;
}

.confirmation-error .button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

/* Print Styles */
@media print {
    .confirmation-actions {
        display: none;
    }
    
    .mtb-confirmation-page {
        box-shadow: none;
    }
    
    .confirmation-header {
        background: #27ae60 !important;
        -webkit-print-color-adjust: exact;
    }
}

/* Responsive Design for Cart/Checkout */
@media (max-width: 768px) {
    .checkout-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .cart-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .cart-item-price {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .mtb-cart-page,
    .mtb-checkout-page {
        padding: 15px;
    }
    
    .mtb-confirmation-page {
        padding: 10px;
    }
    
    .confirmation-header {
        padding: 30px 15px;
    }
    
    .confirmation-header h1 {
        font-size: 24px;
    }
    
    .success-icon {
        width: 80px;
        height: 80px;
        font-size: 40px;
    }
    
    .confirmation-section {
        padding: 20px 15px;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .booking-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .item-price {
        margin-top: 15px;
        align-self: flex-end;
    }
    
    .booking-total {
        font-size: 20px;
        padding: 15px;
    }
    
    .confirmation-actions .button {
        display: block;
        margin: 10px 0;
        width: 100%;
    }
}