/**
 * Flight Cover Image Editor Styles
 * Suffix: ftc001
 * Version: 1.0.0
 */

/* ========== Wrapper ========== */
.ts-cover-wrapper-ftc001 {
    position: relative;
    width: 100%;
}

/* ========== Preview ========== */
.ts-cover-preview-ftc001 {
    position: relative;
    width: 100%;
    height: 500px;
    background-size: cover;
    background-repeat: no-repeat;
    border-radius: 8px;
    overflow: hidden;
    background-color: #f0f0f0;
}

/* Placeholder */
.ts-cover-placeholder-ftc001 {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #999;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
}

.ts-cover-placeholder-ftc001 svg {
    opacity: 0.5;
}

.ts-cover-placeholder-ftc001 span {
    font-size: 14px;
}

/* ========== Edit Button ========== */
.ts-cover-edit-btn-ftc001 {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
    z-index: 10;
}

.ts-cover-edit-btn-ftc001:hover {
    background: #fff;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.ts-cover-edit-btn-ftc001:active {
    transform: scale(0.98);
}

.ts-cover-edit-btn-ftc001 svg {
    width: 18px;
    height: 18px;
}

/* ========== Modal ========== */
.ts-cover-modal-ftc001 {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Backdrop */
.ts-cover-backdrop-ftc001 {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

/* Panel */
.ts-cover-panel-ftc001 {
    position: relative;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: tsCoverSlideUp 0.3s ease;
}

@keyframes tsCoverSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Panel Header */
.ts-cover-panel-header-ftc001 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
}

.ts-cover-panel-header-ftc001 h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.ts-cover-close-btn-ftc001 {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.ts-cover-close-btn-ftc001:hover {
    background: #f5f5f5;
    color: #333;
}

/* Panel Body */
.ts-cover-panel-body-ftc001 {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

/* ========== Device Tabs ========== */
.ts-cover-device-tabs-ftc001 {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    padding: 4px;
    background: #f5f5f5;
    border-radius: 8px;
}

.ts-cover-tab-ftc001 {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #666;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.ts-cover-tab-ftc001:hover {
    color: #333;
    background: rgba(255, 255, 255, 0.5);
}

.ts-cover-tab-ftc001.active {
    background: #fff;
    color: #0073aa;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.ts-cover-tab-ftc001 svg {
    width: 18px;
    height: 18px;
}

/* Green dot indicator for uploaded images */
.ts-cover-tab-dot-ftc001 {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    background: #28a745;
    border-radius: 50%;
    border: 2px solid #fff;
}

/* ========== Drop Zone ========== */
.ts-cover-dropzone-ftc001 {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 30px 20px;
    text-align: center;
    transition: all 0.2s ease;
    cursor: pointer;
    margin-bottom: 20px;
}

.ts-cover-dropzone-ftc001:hover {
    border-color: #0073aa;
    background: #f8fbfd;
}

.ts-cover-dropzone-ftc001.drag-over {
    border-color: #0073aa;
    background: #e8f4fc;
    border-style: solid;
}

.ts-cover-dropzone-content-ftc001 {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    pointer-events: none;
}

.ts-cover-dropzone-content-ftc001 svg {
    color: #999;
}

.ts-cover-dropzone-ftc001:hover .ts-cover-dropzone-content-ftc001 svg,
.ts-cover-dropzone-ftc001.drag-over .ts-cover-dropzone-content-ftc001 svg {
    color: #0073aa;
}

.ts-cover-dropzone-content-ftc001 p {
    margin: 0;
    font-size: 14px;
    color: #666;
}

.ts-cover-browse-ftc001 {
    color: #0073aa;
    text-decoration: underline;
    cursor: pointer;
}

.ts-cover-dropzone-content-ftc001 small {
    font-size: 12px;
    color: #999;
}

/* ========== Mobile Upload Buttons ========== */
.ts-cover-mobile-upload-ftc001 {
    display: none;
    gap: 10px;
    margin-bottom: 20px;
}

.ts-cover-camera-btn-ftc001,
.ts-cover-gallery-btn-ftc001 {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: #fff;
    color: #666;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ts-cover-camera-btn-ftc001:hover,
.ts-cover-gallery-btn-ftc001:hover {
    border-color: #0073aa;
    color: #0073aa;
    background: #f8fbfd;
}

.ts-cover-camera-btn-ftc001:active,
.ts-cover-gallery-btn-ftc001:active {
    transform: scale(0.98);
}

.ts-cover-camera-btn-ftc001 svg,
.ts-cover-gallery-btn-ftc001 svg {
    width: 24px;
    height: 24px;
}

/* Show mobile buttons on touch devices */
@media (hover: none) and (pointer: coarse) {
    .ts-cover-mobile-upload-ftc001 {
        display: flex;
    }
}

/* Also show on small screens */
@media (max-width: 768px) {
    .ts-cover-mobile-upload-ftc001 {
        display: flex;
    }
}

/* ========== Position Section ========== */
.ts-cover-position-section-ftc001 {
    margin-top: 10px;
}

.ts-cover-position-section-ftc001 label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 10px;
}

/* Position Editor */
.ts-cover-position-editor-ftc001 {
    position: relative;
    width: 100%;
    height: 200px;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    background-color: #f0f0f0;
    border-radius: 8px;
    cursor: crosshair;
    overflow: hidden;
    border: 1px solid #ddd;
}

.ts-cover-no-image-ftc001 {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #999;
    font-size: 14px;
}

/* Position Indicator */
.ts-cover-position-indicator-ftc001 {
    position: absolute;
    width: 40px;
    height: 40px;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 10;
}

.ts-cover-crosshair-ftc001 {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    transform: translate(-50%, -50%);
}

.ts-cover-crosshair-ftc001::before,
.ts-cover-crosshair-ftc001::after {
    content: '';
    position: absolute;
    background: #fff;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.5);
}

.ts-cover-crosshair-ftc001::before {
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    transform: translateY(-50%);
}

.ts-cover-crosshair-ftc001::after {
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    transform: translateX(-50%);
}

/* Center dot */
.ts-cover-position-indicator-ftc001::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 12px;
    background: #0073aa;
    border: 2px solid #fff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* Position Info */
.ts-cover-position-info-ftc001 {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 10px;
    font-size: 13px;
    color: #666;
}

.ts-cover-position-info-ftc001 strong {
    color: #333;
    font-weight: 600;
}

.ts-cover-reset-pos-ftc001 {
    margin-left: auto;
    padding: 4px 10px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 4px;
    font-size: 12px;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ts-cover-reset-pos-ftc001:hover {
    border-color: #0073aa;
    color: #0073aa;
}

/* ========== Panel Footer ========== */
.ts-cover-panel-footer-ftc001 {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 20px;
    border-top: 1px solid #eee;
    background: #fafafa;
}

.ts-cover-cancel-btn-ftc001 {
    padding: 10px 20px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 6px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ts-cover-cancel-btn-ftc001:hover {
    border-color: #999;
    color: #333;
}

.ts-cover-save-btn-ftc001 {
    padding: 10px 24px;
    border: none;
    background: linear-gradient(135deg, #0073aa 0%, #005a87 100%);
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ts-cover-save-btn-ftc001:hover {
    background: linear-gradient(135deg, #005a87 0%, #004a6e 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.3);
}

.ts-cover-save-btn-ftc001:active {
    transform: translateY(0);
}

.ts-cover-save-btn-ftc001:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ========== Toast Notification ========== */
.ts-cover-toast-ftc001 {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 12px 24px;
    background: #333;
    color: #fff;
    border-radius: 8px;
    font-size: 14px;
    z-index: 9999999;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.ts-cover-toast-ftc001.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.ts-cover-toast-ftc001.success {
    background: #28a745;
}

.ts-cover-toast-ftc001.error {
    background: #dc3545;
}

.ts-cover-toast-ftc001.info {
    background: #17a2b8;
}

/* ========== Loading State ========== */
.ts-cover-loading-ftc001 {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    z-index: 100;
}

.ts-cover-spinner-ftc001 {
    width: 40px;
    height: 40px;
    border: 3px solid #eee;
    border-top-color: #0073aa;
    border-radius: 50%;
    animation: tsCoverSpin 0.8s linear infinite;
}

@keyframes tsCoverSpin {
    to {
        transform: rotate(360deg);
    }
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
    .ts-cover-modal-ftc001 {
        padding: 10px;
    }

    .ts-cover-panel-ftc001 {
        max-height: 95vh;
    }

    .ts-cover-panel-header-ftc001 {
        padding: 14px 16px;
    }

    .ts-cover-panel-body-ftc001 {
        padding: 16px;
    }

    .ts-cover-dropzone-ftc001 {
        padding: 24px 16px;
    }

    .ts-cover-position-editor-ftc001 {
        height: 160px;
    }

    .ts-cover-position-info-ftc001 {
        flex-wrap: wrap;
        gap: 10px;
    }

    .ts-cover-reset-pos-ftc001 {
        margin-left: 0;
        width: 100%;
        text-align: center;
        margin-top: 5px;
    }

    .ts-cover-panel-footer-ftc001 {
        padding: 14px 16px;
    }

    .ts-cover-cancel-btn-ftc001,
    .ts-cover-save-btn-ftc001 {
        flex: 1;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .ts-cover-preview-ftc001 {
        height: 200px;
    }

    .ts-cover-panel-header-ftc001 h3 {
        font-size: 16px;
    }

    .ts-cover-position-editor-ftc001 {
        height: 140px;
    }
}
