/* ===== ITINERARY BUILDER STYLES ===== */

/* Timeline Styles */
.timeline-container {
    padding: 0 15px;
    position: relative;
}

.timeline-item {
    display: flex;
    margin-bottom: 20px;
    position: relative;
    transition: all 0.3s ease;
}

.timeline-item.active {
    transform: translateX(5px);
}

.timeline-connector {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-right: 15px;
}

.timeline-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border: 3px solid #e9ecef;
    font-size: 16px;
    transition: all 0.3s ease;
    z-index: 2;
}

.timeline-dot.active {
    background: #667eea;
    border-color: #667eea;
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.timeline-line {
    width: 2px;
    height: 40px;
    background: linear-gradient(to bottom, #e9ecef, #f8f9fa);
    margin-top: 8px;
}

.timeline-content {
    flex: 1;
    animation: fadeInUp 0.5s ease;
}

.day-card {
    border: 1px solid #e9ecef;
    border-radius: 12px;
    background: white;
    transition: all 0.3s ease;
    overflow: hidden;
}

.day-card:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.day-card.selected {
    border-color: #667eea;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.2);
    transform: translateY(-3px);
}

.day-card .card-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #e9ecef;
}

.day-card.selected .card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.day-card.selected .card-header .text-primary {
    color: white !important;
}

.day-card.selected .card-header .text-muted {
    color: rgba(255, 255, 255, 0.8) !important;
}

.activity-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Empty State */
.empty-state {
    padding: 2rem;
    border: 2px dashed #e9ecef;
    border-radius: 12px;
    background: #f8f9fa;
}

/* Improved Product Cards */
.product-card {
    border: 1px solid #e9ecef;
    border-radius: 12px;
    background: white;
    transition: all 0.3s ease;
    overflow: hidden;
    margin-bottom: 15px;
}

.product-card:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.product-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

/* Itinerary Cards Improved */
.itinerary-card {
    border: 1px solid #e9ecef;
    border-radius: 12px;
    background: white;
    transition: all 0.3s ease;
    overflow: hidden;
    margin-bottom: 15px;
}

.itinerary-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.itinerary-item {
    border: 1px solid #e9ecef;
    border-radius: 12px;
    background: white;
    transition: all 0.3s ease;
    margin-bottom: 10px;
    overflow: hidden;
}

.itinerary-item:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
}

/* Loading States */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Animations */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .timeline-container {
        padding: 0 10px;
    }

    .timeline-dot {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }

    .timeline-line {
        height: 30px;
    }

    .day-card .card-header {
        padding: 0.75rem;
    }

    .product-image {
        width: 50px;
        height: 50px;
    }
}

/* Summary Cards */
.summary-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    color: white;
}

.summary-card .card-body {
    position: relative;
    overflow: hidden;
}

.summary-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(30px, -30px);
}

/* Filter improvements */
.filter-dropdown {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background: white;
    transition: all 0.3s ease;
}

.filter-dropdown:hover {
    border-color: #667eea;
}

/* Custom badges */
.status-badge {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-weight: 500;
}

/* Price display */
.price-display {
    font-size: 1.1rem;
    font-weight: 600;
    color: #28a745;
}

/* Micro-interactions */
.btn-interactive {
    transition: all 0.3s ease;
}

.btn-interactive:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Toast notifications style */
.toast-custom {
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* Activity Timeline Styles */
.activity-timeline {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 30px;
}

.timeline-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    z-index: 2;
}

.timeline-connector-line {
    width: 2px;
    height: 40px;
    background: linear-gradient(to bottom, #667eea, #e9ecef);
    margin-top: 8px;
    opacity: 0.3;
}

/* Activities Container */
.activities-container {
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 10px;
}

.activities-container::-webkit-scrollbar {
    width: 6px;
}

.activities-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.activities-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.activities-container::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Day Summary Card */
.day-summary-card {
    animation: slideInUp 0.3s ease;
}

/* Enhanced Product Cards for Right Column */
.products-grid {
    display: grid;
    gap: 12px;
}

.product-card-enhanced {
    border: 1px solid #e9ecef;
    border-radius: 12px;
    background: white;
    transition: all 0.3s ease;
    overflow: hidden;
    cursor: pointer;
}

.product-card-enhanced:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.product-card-enhanced .product-image-large {
    width: 80px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.product-card-enhanced .product-image-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.product-card-enhanced .product-info {
    flex: 1;
    min-width: 0;
}

.product-card-enhanced .product-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.25rem;
    line-height: 1.2;
}

.product-card-enhanced .product-category {
    font-size: 0.75rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.product-card-enhanced .product-features {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 0.5rem;
}

.product-card-enhanced .feature-badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    color: #495057;
}

/* Filter Section Enhanced */
.filters-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.filter-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 8px;
}

.filter-row:last-child {
    grid-template-columns: 1fr;
}

.search-input-enhanced {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.search-input-enhanced:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.15);
}

.filter-select-enhanced {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 0.4rem 0.6rem;
    font-size: 0.8rem;
    background: white;
    transition: all 0.3s ease;
}

.filter-select-enhanced:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.15);
}

/* Enhanced Price Card */
.price-card-enhanced {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    color: white;
    position: relative;
    overflow: hidden;
}

.price-card-enhanced::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: rotate(45deg);
}

.price-card-enhanced .card-body {
    position: relative;
    z-index: 2;
}

/* Animations */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Workflow Steps */
.workflow-steps {
    display: flex;
    align-items: center;
    gap: 0;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.step.active {
    opacity: 1;
}

.step.completed {
    opacity: 1;
}

.step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.step.active .step-number {
    background: white;
    color: #667eea;
    border-color: white;
    transform: scale(1.1);
}

.step.completed .step-number {
    background: #28a745;
    border-color: #28a745;
}

.step.completed .step-number::before {
    content: '✓';
    font-size: 16px;
    font-weight: bold;
}

.step-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 4px;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
}

.step.active .step-label {
    color: white;
    font-weight: 600;
}

.step-connector {
    width: 30px;
    height: 2px;
    background: rgba(255, 255, 255, 0.3);
    margin: 0 8px;
    position: relative;
    top: -8px;
}

.step.completed + .step-connector {
    background: #28a745;
}

/* Progress Breadcrumb for main page */
.progress-breadcrumb {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border: 1px solid #e9ecef;
}

.breadcrumb-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.breadcrumb-step {
    display: flex;
    align-items: center;
    color: #6c757d;
    font-size: 0.9rem;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.breadcrumb-step:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    text-decoration: none;
}

.breadcrumb-step.active {
    background: #667eea;
    color: white;
    font-weight: 600;
}

.breadcrumb-step.completed {
    background: #28a745;
    color: white;
}

.breadcrumb-step i {
    margin-right: 0.5rem;
}

.breadcrumb-connector {
    color: #dee2e6;
    font-size: 1.2rem;
}

/* Loading and Success States */
.success-animation {
    display: inline-block;
    animation: bounceIn 0.6s ease;
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.pulse-animation {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(102, 126, 234, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0);
    }
}

/* Interactive Elements */
.interactive-card {
    transition: all 0.3s ease;
    cursor: pointer;
}

.interactive-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.interactive-card:active {
    transform: translateY(-2px);
}

/* Action Buttons Enhanced */
.btn-action-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-action-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
    color: white;
}

.btn-action-secondary {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    color: #495057;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-action-secondary:hover {
    background: #e9ecef;
    border-color: #dee2e6;
    transform: translateY(-1px);
}

/* Enhanced Tooltips */
.tooltip-enhanced {
    position: relative;
    cursor: help;
}

.tooltip-enhanced::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.tooltip-enhanced:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-5px);
}

/* Loading States and Micro-interactions */
.loading-state {
    opacity: 0.7;
    pointer-events: none;
}

.spinner {
    animation: spin 1s linear infinite;
}

.btn-interactive {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-interactive::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-interactive:hover::before {
    width: 300px;
    height: 300px;
}

.btn-interactive:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn-interactive:active {
    transform: translateY(0);
    transition: transform 0.1s;
}

/* Card hover effects */
.timeline-item {
    transition: all 0.3s ease;
}

.timeline-item:hover {
    transform: translateX(3px);
}

.timeline-item:hover .timeline-dot {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(102, 126, 234, 0.4);
}

/* Product card interactions */
.product-card-enhanced {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.product-card-enhanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
    transition: left 0.6s;
}

.product-card-enhanced:hover::before {
    left: 100%;
}

.product-card-enhanced:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.2);
}

/* Activity card animations */
.itinerary-card {
    transition: all 0.3s ease;
    animation: slideInRight 0.5s ease forwards;
}

.itinerary-card:hover {
    transform: translateX(5px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.itinerary-card:hover .timeline-number {
    transform: scale(1.2);
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.5);
}

/* Success states */
.success-state {
    animation: successPulse 0.6s ease;
}

@keyframes successPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 20px rgba(40, 167, 69, 0.3);
    }
    100% {
        transform: scale(1);
    }
}

/* Error states */
.error-state {
    animation: errorShake 0.6s ease;
    border-color: #dc3545 !important;
}

@keyframes errorShake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-5px);
    }
    75% {
        transform: translateX(5px);
    }
}

/* Progress indicators */
.progress-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    animation: spin 1s linear infinite;
}

/* Notification badges */
.notification-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    animation: bounceIn 0.5s ease;
}

/* Floating action effects */
.floating-action {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    font-size: 24px;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
    z-index: 1000;
}

.floating-action:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.4);
    color: white;
}

/* Form input effects */
.form-control-enhanced {
    transition: all 0.3s ease;
    border: 2px solid #e9ecef;
}

.form-control-enhanced:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

/* Skeleton loading */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.skeleton-line {
    height: 1rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.skeleton-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

/* Toast notifications enhanced */
.toast-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    border-left: 4px solid #28a745;
    animation: slideInRight 0.5s ease, fadeOut 0.5s ease 4.5s forwards;
    z-index: 1050;
}

.toast-notification.error {
    border-left-color: #dc3545;
}

.toast-notification.warning {
    border-left-color: #ffc107;
}

.toast-notification.info {
    border-left-color: #17a2b8;
}

/* Responsive mobile optimizations */
@media (max-width: 768px) {
    .workflow-steps {
        display: none;
    }

    .progress-breadcrumb {
        padding: 0.75rem;
    }

    .breadcrumb-steps {
        flex-direction: column;
        gap: 0.5rem;
    }

    .breadcrumb-step {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }

    .floating-action {
        width: 50px;
        height: 50px;
        font-size: 20px;
        bottom: 15px;
        right: 15px;
    }
}

/* Mobile Responsiveness */
@media (max-width: 992px) {
    .filter-row {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .product-card-enhanced .product-image-large {
        width: 60px;
        height: 45px;
    }

    .activities-container {
        max-height: 50vh;
    }
}

@media (max-width: 768px) {
    .timeline-container {
        padding: 0 5px;
    }

    .product-card-enhanced {
        padding: 0.75rem;
    }

    .product-card-enhanced .product-image-large {
        width: 50px;
        height: 40px;
    }
}