/**
 * Casa Marengo Tours - Frontend Styles
 */

.tour-booking-fields {
    background: #f5f5f5;
    padding: 25px;
    border-radius: 8px;
    margin: 30px 0;
}

.tour-booking-fields h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #1a1a1a;
    font-family: 'Playfair Display', serif;
}

.tour-booking-fields label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

.tour-booking-fields select,
.tour-booking-fields input[type="number"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.tour-booking-fields select:focus,
.tour-booking-fields input[type="number"]:focus {
    outline: none;
    border-color: #DAA520;
}

.tour-booking-fields p {
    margin-bottom: 20px;
}

.tour-single-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin: 40px 0;
}

.tour-gallery {
    position: relative;
}

.tour-gallery img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.tour-details {
    background: white;
}

.tour-meta-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 30px 0;
    padding: 20px;
    background: #f5f5f5;
    border-radius: 8px;
}

.tour-meta-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tour-meta-item i {
    font-size: 24px;
    color: #DAA520;
}

.tour-meta-item .meta-label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tour-meta-item .meta-value {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
}

.tour-price-box {
    background: #1a1a1a;
    color: white;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    margin: 30px 0;
}

.tour-price-box .price-label {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.tour-price-box .price-value {
    font-size: 48px;
    font-weight: 700;
    color: #DAA520;
    font-family: 'Playfair Display', serif;
}

.tour-price-box .price-note {
    font-size: 12px;
    margin-top: 10px;
    opacity: 0.8;
}

.tour-includes-excludes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin: 40px 0;
}

.includes-box,
.excludes-box {
    padding: 25px;
    border-radius: 8px;
}

.includes-box {
    background: #e8f5e9;
    border-left: 4px solid #28a745;
}

.excludes-box {
    background: #ffebee;
    border-left: 4px solid #dc3545;
}

.includes-box h3,
.excludes-box h3 {
    margin-top: 0;
    margin-bottom: 15px;
}

.includes-box ul,
.excludes-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.includes-box li,
.excludes-box li {
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
}

.includes-box li:before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #28a745;
    font-weight: 700;
}

.excludes-box li:before {
    content: '✗';
    position: absolute;
    left: 0;
    color: #dc3545;
    font-weight: 700;
}

.tour-itinerary {
    background: #f9f9f9;
    padding: 30px;
    border-radius: 8px;
    margin: 40px 0;
}

.tour-itinerary h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #1a1a1a;
}

.tour-itinerary p {
    line-height: 1.8;
    color: #555;
}

@media (max-width: 768px) {
    .tour-single-layout,
    .tour-includes-excludes,
    .tour-meta-info {
        grid-template-columns: 1fr;
    }
    
    .tour-price-box .price-value {
        font-size: 36px;
    }
}

/* Calendar Styles */
.tour-calendar {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
}

.tour-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.tour-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.calendar-day:hover {
    background: #f5f5f5;
}

.calendar-day.available {
    background: #e8f5e9;
    border-color: #28a745;
}

.calendar-day.selected {
    background: #DAA520;
    color: white;
    font-weight: 600;
}

.calendar-day.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* jQuery UI Datepicker Custom Styles - Modern Design */
#tour_date,
#modal_tour_date {
    cursor: pointer;
    padding-right: 45px !important;
    background-color: white;
}

.tour-booking-fields p[style*="position: relative"],
.modal-form-group {
    position: relative;
}

.calendar-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #8A6240;
    font-size: 20px;
    z-index: 1;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.tour-booking-fields:hover .calendar-icon,
.modal-form-group:hover .calendar-icon {
    opacity: 1;
}

/* Override jQuery UI Datepicker styles - Modern Clean Design */
.ui-datepicker {
    background: #ffffff;
    border: none;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(16, 40, 32, 0.15), 0 0 0 1px rgba(16, 40, 32, 0.05);
    padding: 20px;
    width: 340px !important;
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
    z-index: 99999 !important;
}

.ui-datepicker-header {
    background: #102820;
    color: #ffffff;
    border: none;
    border-radius: 12px 12px 0 0;
    padding: 16px 20px;
    margin: -20px -20px 0 -20px;
    position: relative;
}

.ui-datepicker-title {
    text-align: center;
    font-weight: 700;
    font-size: 17px;
    line-height: 32px;
    color: #ffffff;
    letter-spacing: 0.3px;
}

.ui-datepicker-prev,
.ui-datepicker-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.15);
    border: none;
}

.ui-datepicker-prev:hover,
.ui-datepicker-next:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-50%) scale(1.05);
}

.ui-datepicker-prev {
    left: 0;
}

.ui-datepicker-next {
    right: 0;
}

.ui-datepicker-prev span,
.ui-datepicker-next span {
    display: block;
    text-indent: -9999px;
    position: relative;
}

.ui-datepicker-prev span:after {
    content: '←';
    position: absolute;
    left: 0;
    top: -2px;
    font-size: 18px;
    text-indent: 0;
    color: #ffffff;
    font-weight: 700;
    width: 32px;
    text-align: center;
}

.ui-datepicker-next span:after {
    content: '→';
    position: absolute;
    right: 0;
    top: -2px;
    font-size: 18px;
    text-indent: 0;
    color: #ffffff;
    font-weight: 700;
    width: 32px;
    text-align: center;
}

.ui-datepicker-prev:hover span:after,
.ui-datepicker-next:hover span:after {
    color: #ffffff;
}

.ui-datepicker-calendar {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 20px;
}

.ui-datepicker-calendar thead th {
    text-align: center;
    font-weight: 600;
    font-size: 11px;
    color: #8A6240;
    padding: 12px 0;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border: none;
}

.ui-datepicker-calendar tbody td {
    text-align: center;
    padding: 3px;
    border: none;
}

.ui-datepicker-calendar tbody td a,
.ui-datepicker-calendar tbody td span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    text-decoration: none;
    color: #102820;
    border-radius: 10px;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    margin: 0 auto;
}

.ui-datepicker-calendar tbody td a:hover {
    background: #f5f5f5;
    color: #102820;
    transform: scale(1.08);
    border-color: #e0e0e0;
}

/* Available dates - Modern Green Style */
.ui-datepicker-calendar tbody td.available-date a {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border: 2px solid #4C6444;
    color: #102820;
    font-weight: 700;
    position: relative;
}

.ui-datepicker-calendar tbody td.available-date a::after {
    content: '✓';
    position: absolute;
    top: 2px;
    right: 4px;
    font-size: 8px;
    color: #4C6444;
    font-weight: 900;
}

.ui-datepicker-calendar tbody td.available-date a:hover {
    background: linear-gradient(135deg, #4C6444 0%, #2e3d29 100%);
    color: #ffffff;
    transform: scale(1.12);
    box-shadow: 0 4px 12px rgba(76, 100, 68, 0.3);
    border-color: #4C6444;
}

.ui-datepicker-calendar tbody td.available-date a:hover::after {
    color: #ffffff;
}

/* Unavailable dates - Disabled Style */
.ui-datepicker-calendar tbody td.unavailable-date span {
    color: #666666 !important;
    cursor: not-allowed;
    opacity: 1 !important;
    background: #f5f5f5 !important;
    font-weight: 400;
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 2px solid #e0e0e0;
    margin: 0 auto;
}

/* Disabled state - jQuery UI default */
.ui-datepicker-calendar tbody td.ui-datepicker-unselectable span {
    color: #888888 !important;
    cursor: not-allowed;
    opacity: 1 !important;
    background: #f8f8f8 !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid #e8e8e8;
    margin: 0 auto;
}

/* Other month days */
.ui-datepicker-calendar tbody td.ui-datepicker-other-month span {
    color: #cccccc !important;
    opacity: 0.6 !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}
.ui-datepicker-calendar tbody td.ui-datepicker-current-day a,
.ui-datepicker-calendar tbody td.ui-datepicker-today a.ui-state-active {
    background: linear-gradient(135deg, #8A6240 0%, #6d4d33 100%);
    color: #ffffff;
    font-weight: 700;
    border: 2px solid #8A6240;
    box-shadow: 0 4px 16px rgba(138, 98, 64, 0.4);
    transform: scale(1.1);
}

.ui-datepicker-calendar tbody td.ui-datepicker-current-day a::after {
    color: #ffffff;
}

/* Today - Special Style */
.ui-datepicker-calendar tbody td.ui-datepicker-today a {
    background: #fff8e1;
    border: 2px solid #CABA9C;
    font-weight: 600;
    position: relative;
}

.ui-datepicker-calendar tbody td.ui-datepicker-today a::before {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: #8A6240;
    border-radius: 50%;
}

/* Disabled state */
.ui-datepicker-calendar tbody td.ui-datepicker-unselectable span {
    color: #e0e0e0;
    cursor: not-allowed;
    opacity: 0.3;
}

/* Week numbers (if enabled) */
.ui-datepicker-calendar .ui-datepicker-week-col {
    color: #999;
    font-size: 11px;
    font-weight: 500;
}

/* Animation for calendar appearance */
@keyframes datepickerSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ui-datepicker {
    animation: datepickerSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Responsive Datepicker */
@media (max-width: 480px) {
    .ui-datepicker {
        width: 300px !important;
        padding: 16px;
    }
    
    .ui-datepicker-header {
        padding-bottom: 16px;
    }
    
    .ui-datepicker-title {
        font-size: 15px;
    }
    
    .ui-datepicker-calendar tbody td a,
    .ui-datepicker-calendar tbody td span {
        width: 36px;
        height: 36px;
        font-size: 13px;
        border-radius: 8px;
    }
    
    .ui-datepicker-calendar thead th {
        font-size: 10px;
        padding: 10px 0;
    }
    
    .ui-datepicker-prev,
    .ui-datepicker-next {
        width: 28px;
        height: 28px;
    }
    
    .ui-datepicker-prev span:after,
    .ui-datepicker-next span:after {
        font-size: 16px;
    }
}

/* Additional hover effects */
.ui-datepicker-calendar tbody td.available-date {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.95;
    }
}
    color: #ddd;
    cursor: not-allowed;
}

/* Responsive Datepicker */
@media (max-width: 480px) {
    .ui-datepicker {
        width: 280px !important;
        padding: 12px;
    }
    
    .ui-datepicker-header {
        padding: 10px;
    }
    
    .ui-datepicker-title {
        font-size: 14px;
    }
    
    .ui-datepicker-calendar tbody td a,
    .ui-datepicker-calendar tbody td span {
        padding: 8px;
        font-size: 14px;
    }
}
