/**
 * Tour Media Manager Styles
 * Version: 1.0
 * File: toursure-edit-program-005.css
 */

/* ========================================
   Container & Wrapper
   ======================================== */
.media-manager-wrapper-bkt582 {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.media-error-bkt582 {
    background: #fee;
    border: 1px solid #fcc;
    color: #c00;
    padding: 15px;
    border-radius: 4px;
    margin: 20px 0;
    text-align: center;
}

/* ========================================
   Header Section
   ======================================== */
.media-header-bkt582 {
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}

.media-title-bkt582 {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.edit-mode-badge-bkt582 {
    background: #4CAF50;
    color: white;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: normal;
}

/* ========================================
   Media Grid Layout
   ======================================== */
.media-grid-bkt582 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .media-grid-bkt582 {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   Media Sections
   ======================================== */
.media-section-bkt582 {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
}

.media-section-bkt582:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.section-title-bkt582 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0 0 20px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title-bkt582 .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    color: #0073aa;
}

.section-title-bkt582 .required {
    color: #dc3232;
    font-weight: normal;
}

/* ========================================
   Featured Image Section
   ======================================== */
.featured-image-container-bkt582 {
    position: relative;
}

.image-preview-bkt582 {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #ddd;
}

.image-preview-bkt582 img {
    width: 100%;
    height: auto;
    display: block;
}

.image-actions-bkt582 {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    padding: 15px;
    display: flex;
    gap: 10px;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-preview-bkt582:hover .image-actions-bkt582 {
    opacity: 1;
}

.image-actions-bkt582 button {
    background: rgba(255, 255, 255, 0.95);
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    transition: all 0.3s ease;
}

.image-actions-bkt582 button:hover {
    background: white;
    transform: translateY(-2px);
}

.image-placeholder-bkt582 {
    text-align: center;
    padding: 40px;
    background: white;
    border: 2px dashed #ccc;
    border-radius: 8px;
}

.btn-add-image-bkt582 {
    background: #0073aa;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.btn-add-image-bkt582:hover {
    background: #005a87;
    transform: translateY(-2px);
}

.btn-add-image-bkt582 .dashicons {
    font-size: 32px;
    width: 32px;
    height: 32px;
}

.no-image-bkt582 {
    text-align: center;
    padding: 40px;
    color: #999;
}

/* ========================================
   Gallery Section
   ======================================== */
.gallery-container-bkt582 {
    position: relative;
}

.gallery-grid-bkt582 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin-bottom: 15px;
    min-height: 100px;
}

.gallery-grid-bkt582.sortable {
    cursor: move;
}

.gallery-item-bkt582 {
    position: relative;
    aspect-ratio: 1;
    border-radius: 4px;
    overflow: hidden;
    background: #f0f0f0;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.gallery-item-bkt582:hover {
    border-color: #0073aa;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.gallery-item-bkt582 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.btn-remove-gallery-item-bkt582 {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(244, 67, 54, 0.9);
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.gallery-item-bkt582:hover .btn-remove-gallery-item-bkt582 {
    opacity: 1;
}

.btn-remove-gallery-item-bkt582:hover {
    background: #f44336;
    transform: scale(1.1);
}

.gallery-placeholder-bkt582 {
    border: 2px dashed #0073aa;
    background: rgba(0, 115, 170, 0.1);
    border-radius: 4px;
}

.btn-add-gallery-bkt582 {
    background: white;
    border: 2px dashed #0073aa;
    color: #0073aa;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    width: 100%;
    justify-content: center;
}

.btn-add-gallery-bkt582:hover {
    background: #0073aa;
    color: white;
}

/* ========================================
   Video Section
   ======================================== */
.video-container-bkt582 {
    position: relative;
}

.video-url-field-bkt582 {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    margin-bottom: 10px;
}

.video-url-field-bkt582:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.1);
}

.btn-save-video-bkt582 {
    background: #0073aa;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.btn-save-video-bkt582:hover {
    background: #005a87;
}

.video-link-bkt582 {
    color: #0073aa;
    text-decoration: none;
    word-break: break-all;
    display: block;
    margin-bottom: 10px;
}

.video-link-bkt582:hover {
    text-decoration: underline;
}

.no-video-bkt582 {
    color: #999;
    font-style: italic;
}

.video-preview-bkt582 {
    margin-top: 15px;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
}

.video-preview-bkt582 iframe {
    width: 100%;
    aspect-ratio: 16/9;
    display: block;
}

/* ========================================
   File/Brochure Section
   ======================================== */
.brochure-container-bkt582 {
    position: relative;
}

.file-preview-bkt582 {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.file-icon {
    width: 48px;
    height: 48px;
    background: #f0f0f0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.file-icon .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
    color: #666;
}

.file-info {
    flex: 1;
    min-width: 0;
}

.file-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-size {
    font-size: 12px;
    color: #999;
}

.file-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.file-actions button,
.file-actions a {
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-download-bkt582 {
    background: #4CAF50;
    color: white;
    border: none;
}

.btn-download-bkt582:hover {
    background: #45a049;
}

.btn-change-file-bkt582 {
    background: #2196F3;
    color: white;
    border: none;
}

.btn-change-file-bkt582:hover {
    background: #1976D2;
}

.btn-remove-file-bkt582 {
    background: #f44336;
    color: white;
    border: none;
}

.btn-remove-file-bkt582:hover {
    background: #da190b;
}

.file-placeholder-bkt582 {
    text-align: center;
    padding: 40px;
    background: white;
    border: 2px dashed #ccc;
    border-radius: 8px;
}

.btn-add-file-bkt582 {
    background: #0073aa;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.btn-add-file-bkt582:hover {
    background: #005a87;
    transform: translateY(-2px);
}

.btn-add-file-bkt582 .dashicons {
    font-size: 32px;
    width: 32px;
    height: 32px;
}

.no-file-bkt582 {
    text-align: center;
    padding: 40px;
    color: #999;
}

/* ========================================
   Documents Section
   ======================================== */
.documents-section {
    grid-column: 1 / -1;
}

.documents-container-bkt582 {
    position: relative;
}

.documents-list-bkt582 {
    margin-bottom: 15px;
}

.document-item-bkt582 {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.document-item-bkt582:hover {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border-color: #0073aa;
}

.doc-icon {
    width: 40px;
    height: 40px;
    background: #f5f5f5;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.doc-icon .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    color: #666;
}

.doc-info {
    flex: 1;
    min-width: 0;
}

.doc-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.doc-name {
    font-size: 12px;
    color: #999;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.doc-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.btn-view-doc-bkt582,
.btn-delete-doc-bkt582 {
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.3s ease;
    text-decoration: none;
    border: none;
}

.btn-view-doc-bkt582 {
    background: #2196F3;
    color: white;
}

.btn-view-doc-bkt582:hover {
    background: #1976D2;
}

.btn-delete-doc-bkt582 {
    background: #f44336;
    color: white;
}

.btn-delete-doc-bkt582:hover {
    background: #da190b;
}

.btn-add-document-bkt582 {
    background: white;
    border: 2px dashed #0073aa;
    color: #0073aa;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    width: 100%;
    justify-content: center;
}

.btn-add-document-bkt582:hover {
    background: #0073aa;
    color: white;
}

/* ========================================
   Document Dialog (Custom)
   ======================================== */
.document-dialog-bkt582 {
    padding: 20px;
}

.dialog-field {
    margin-bottom: 15px;
}

.dialog-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.dialog-field input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

#selected-file-name {
    margin-left: 10px;
    color: #666;
    font-style: italic;
}

/* ========================================
   Toast Notifications
   ======================================== */
.toast-container-bkt582 {
    position: fixed;
    top: 32px;
    right: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.admin-bar .toast-container-bkt582 {
    top: 52px;
}

.toast-bkt582 {
    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-bkt582.show {
    transform: translateX(0);
}

.toast-icon-bkt582 {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

.toast-bkt582.toast-success {
    border-left: 4px solid #4CAF50;
}

.toast-bkt582.toast-success .toast-icon-bkt582 {
    background: #4CAF50;
    color: white;
}

.toast-bkt582.toast-error {
    border-left: 4px solid #f44336;
}

.toast-bkt582.toast-error .toast-icon-bkt582 {
    background: #f44336;
    color: white;
}

.toast-bkt582.toast-info {
    border-left: 4px solid #2196F3;
}

.toast-bkt582.toast-info .toast-icon-bkt582 {
    background: #2196F3;
    color: white;
}

.toast-message-bkt582 {
    flex: 1;
    font-size: 14px;
    color: #333;
}

.toast-close-bkt582 {
    background: none;
    border: none;
    font-size: 20px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    transition: color 0.3s ease;
}

.toast-close-bkt582:hover {
    color: #333;
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 1024px) {
    .gallery-grid-bkt582 {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }
}

@media (max-width: 768px) {
    .media-grid-bkt582 {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .file-preview-bkt582 {
        flex-direction: column;
        text-align: center;
    }
    
    .file-actions {
        width: 100%;
        justify-content: center;
    }
    
    .document-item-bkt582 {
        flex-direction: column;
        text-align: center;
        padding: 15px;
    }
    
    .doc-info {
        width: 100%;
        text-align: center;
    }
    
    .doc-actions {
        width: 100%;
        justify-content: center;
    }
    
    .toast-container-bkt582 {
        left: 10px;
        right: 10px;
    }
    
    .toast-bkt582 {
        min-width: auto;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .media-manager-wrapper-bkt582 {
        padding: 15px;
    }
    
    .media-title-bkt582 {
        font-size: 20px;
    }
    
    .section-title-bkt582 {
        font-size: 16px;
    }
    
    .gallery-grid-bkt582 {
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
        gap: 5px;
    }
    
    .file-actions {
        flex-direction: column;
        gap: 5px;
    }
    
    .file-actions button,
    .file-actions a {
        width: 100%;
        justify-content: center;
    }
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
    .image-actions-bkt582,
    .btn-remove-gallery-item-bkt582,
    .btn-add-gallery-bkt582,
    .btn-save-video-bkt582,
    .btn-change-file-bkt582,
    .btn-remove-file-bkt582,
    .btn-add-file-bkt582,
    .btn-delete-doc-bkt582,
    .btn-add-document-bkt582,
    .toast-container-bkt582,
    .edit-mode-badge-bkt582 {
        display: none !important;
    }
    
    .media-section-bkt582 {
        page-break-inside: avoid;
        border: 1px solid #000;
    }
}

/* ========================================
   Accessibility
   ======================================== */
.media-manager-wrapper-bkt582:focus-within {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

button:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .media-section-bkt582,
    .file-preview-bkt582,
    .document-item-bkt582 {
        border-width: 2px;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .media-section-bkt582,
    .toast-bkt582,
    button,
    .gallery-item-bkt582 {
        transition: none;
    }
}

/* ========================================
   Loading States
   ======================================== */
.media-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.media-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}