/**
 * Tour Itinerary Manager Styles - VERSION 5.0
 * Includes: Toast notifications, field rows, improved gallery
 */

/* ========================================
   Container & Wrapper Styles
   ======================================== */
.itinerary-manager-wrapper-mjk729 {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    position: relative;
}

.itinerary-error-mjk729 {
    background: #fee;
    border: 1px solid #fcc;
    color: #c00;
    padding: 15px;
    border-radius: 4px;
    margin: 20px 0;
}

/* ========================================
   Header Section
   ======================================== */
.itinerary-header-mjk729 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}

.itinerary-title-mjk729 {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.edit-mode-badge-mjk729 {
    background: #4CAF50;
    color: white;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: normal;
}

/* ========================================
   Button Styles
   ======================================== */
.btn-add-day-mjk729 {
    background: #0073aa !important;
    color: white !important;
    border: none !important;
    padding: 10px 20px !important;
    border-radius: 4px !important;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 115, 170, 0.2);
}

.btn-add-day-mjk729:hover {
    background: #005a87 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 115, 170, 0.3);
}

/* ========================================
   Day Item Container
   ======================================== */
.itinerary-days-container-mjk729 {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.day-item-mjk729 {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    position: relative;
    transition: all 0.3s ease;
}

.day-item-mjk729:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.day-item-placeholder-mjk729 {
    background: #fff3cd;
    border: 2px dashed #ffc107;
    border-radius: 8px;
    margin-bottom: 20px;
}

/* Day Header */
.day-header-mjk729 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
    cursor: move;
}

.day-number-mjk729 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.day-actions-mjk729 {
    display: flex;
    gap: 5px;
}

.day-actions-mjk729 button {
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.day-actions-mjk729 button:hover {
    background: #f0f0f0;
    border-color: #999;
}

.btn-delete-day-mjk729:hover {
    background: #fee;
    border-color: #f44336;
    color: #f44336;
}

/* ========================================
   Field Rows and Groups
   ======================================== */
.field-row-mjk729 {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.field-group-mjk729 {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.field-group-mjk729 label {
    font-weight: 600;
    color: #555;
    font-size: 14px;
}

.field-group-mjk729 input[type="text"],
.field-group-mjk729 input[type="number"],
.field-group-mjk729 textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    background: white;
}

.field-group-mjk729 input[type="text"]:focus,
.field-group-mjk729 input[type="number"]:focus,
.field-group-mjk729 textarea:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.1);
}

.day-number-field-mjk729 {
    max-width: 100px;
}

.day-title-field-mjk729 {
    font-size: 16px !important;
    font-weight: 500;
}

.day-activities-field-mjk729 {
    min-height: 120px;
    resize: vertical;
}

/* ========================================
   Meals Checkboxes (Updated)
   ======================================== */
.meals-checkboxes-mjk729 {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    padding: 10px;
    background: white;
    border-radius: 4px;
}

.meal-checkbox-mjk729 {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.meal-checkbox-mjk729 input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.meal-checkbox-mjk729 span {
    font-size: 14px;
    color: #333;
}

.meal-checkbox-mjk729:hover span {
    color: #0073aa;
}

/* ========================================
   Gallery Section (Improved)
   ======================================== */
.gallery-container-mjk729 {
    background: white;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.gallery-images-mjk729 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin-bottom: 15px;
}

.gallery-image-mjk729 {
    position: relative;
    width: 100%;
    padding-bottom: 100%;
    border-radius: 4px;
    overflow: hidden;
    border: 2px solid #ddd;
    background: #f9f9f9;
}

.gallery-image-mjk729 img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-image-mjk729 .remove-image-mjk729 {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(255, 0, 0, 0.9);
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-image-mjk729:hover .remove-image-mjk729 {
    opacity: 1;
}

.btn-add-gallery-mjk729 {
    background: white !important;
    color: #333 !important;
    border: 1px solid #ddd !important;
    padding: 8px 16px !important;
    border-radius: 4px !important;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-add-gallery-mjk729:hover {
    background: #f0f0f0 !important;
    border-color: #0073aa !important;
    color: #0073aa !important;
}

/* ========================================
   Toast Notifications (New Design)
   ======================================== */
.toast-container-mjk729 {
    position: fixed;
    top: 32px;
    right: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.admin-bar .toast-container-mjk729 {
    top: 52px;
}

@media (max-width: 782px) {
    .admin-bar .toast-container-mjk729 {
        top: 66px;
    }
}

.toast-mjk729 {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 300px;
    max-width: 400px;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    pointer-events: all;
}

.toast-mjk729.show {
    transform: translateX(0);
}

/* Toast Icons */
.toast-icon-mjk729 {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

/* Toast Types */
.toast-mjk729.toast-success {
    border-left: 4px solid #4CAF50;
}

.toast-mjk729.toast-success .toast-icon-mjk729 {
    background: #4CAF50;
    color: white;
}

.toast-mjk729.toast-error {
    border-left: 4px solid #f44336;
}

.toast-mjk729.toast-error .toast-icon-mjk729 {
    background: #f44336;
    color: white;
}

.toast-mjk729.toast-info {
    border-left: 4px solid #2196F3;
}

.toast-mjk729.toast-info .toast-icon-mjk729 {
    background: #2196F3;
    color: white;
}

.toast-mjk729.toast-warning {
    border-left: 4px solid #FF9800;
}

.toast-mjk729.toast-warning .toast-icon-mjk729 {
    background: #FF9800;
    color: white;
}

/* Toast Message */
.toast-message-mjk729 {
    flex: 1;
    font-size: 14px;
    color: #333;
}

/* Toast Close Button */
.toast-close-mjk729 {
    background: none;
    border: none;
    font-size: 20px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

.toast-close-mjk729:hover {
    color: #333;
}

/* ========================================
   View Mode Styles
   ======================================== */
.day-title-view-mjk729 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.day-meals-view-mjk729,
.day-accommodation-view-mjk729,
.day-activities-view-mjk729 {
    margin-bottom: 15px;
}

.day-meals-view-mjk729 strong,
.day-accommodation-view-mjk729 strong,
.day-activities-view-mjk729 strong {
    display: inline-block;
    margin-bottom: 5px;
    color: #555;
}

.activities-content-mjk729 {
    background: white;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
    line-height: 1.6;
}

.day-gallery-view-mjk729 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}

.gallery-image-view-mjk729 {
    width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* ========================================
   No Itinerary Message
   ======================================== */
.no-itinerary-mjk729 {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 16px;
    background: #f9f9f9;
    border: 2px dashed #ddd;
    border-radius: 8px;
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 768px) {
    .itinerary-header-mjk729 {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .field-row-mjk729 {
        flex-direction: column;
        gap: 15px;
    }
    
    .field-group-mjk729[style*="width"] {
        width: 100% !important;
    }
    
    .meals-checkboxes-mjk729 {
        flex-direction: column;
        gap: 10px;
    }
    
    .gallery-images-mjk729 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .toast-container-mjk729 {
        left: 10px;
        right: 10px;
    }
    
    .toast-mjk729 {
        min-width: auto;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .btn-add-day-mjk729 {
        width: 100%;
        justify-content: center;
    }
    
    .gallery-images-mjk729 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ========================================
   Animations
   ======================================== */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
    .itinerary-actions-mjk729,
    .day-actions-mjk729,
    .btn-add-gallery-mjk729,
    .remove-image-mjk729,
    .toast-container-mjk729,
    .edit-mode-badge-mjk729 {
        display: none !important;
    }
    
    .day-item-mjk729 {
        page-break-inside: avoid;
        border: 1px solid #000;
        margin-bottom: 20px;
    }
}