/* Image Editor Tool - Custom Styles */

/* Hero Section - Compact */
.editor-hero {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-icon {
    display: inline-block;
}

.hero-icon img {
    width: 48px;
    height: 48px;
    filter: drop-shadow(0 2px 4px rgba(5, 44, 101, 0.2));
}

[data-bs-theme="dark"] .hero-icon img {
    filter: brightness(0) invert(1) drop-shadow(0 2px 4px rgba(147, 197, 253, 0.3));
}

.hero-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #052c65;
    margin-bottom: 0.25rem;
}

[data-bs-theme="dark"] .hero-title {
    color: #93c5fd;
}

.hero-subtitle {
    font-size: 0.95rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Feature Cards - Compact */
.feature-card {
    padding: 1rem;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    text-align: center;
    transition: all 0.2s ease;
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: #052c65;
}

[data-bs-theme="dark"] .feature-card {
    background: #212529;
    border-color: #495057;
}

[data-bs-theme="dark"] .feature-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border-color: #052c65;
}

.feature-icon {
    width: 28px;
    height: 28px;
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

[data-bs-theme="dark"] .feature-icon {
    filter: brightness(0) invert(1);
}

.feature-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.25rem;
}

[data-bs-theme="dark"] .feature-title {
    color: #e9ecef;
}

.feature-desc {
    font-size: 0.75rem;
    color: #6c757d;
    line-height: 1.3;
}

[data-bs-theme="dark"] .feature-desc {
    color: #adb5bd;
}

/* Enhanced Upload Section - Compact */
.upload-section-enhanced {
    max-width: 550px;
    margin: 0 auto;
}

.upload-section-enhanced

.upload-section-enhanced

.upload-section-enhanced

.upload-section-enhanced

.upload-section-enhanced .btn-lg {
    padding: 0.625rem 1.75rem;
    font-size: 1rem;
    font-weight: 500;
}

/* Editor Container */
#editorContainer {
    animation: fadeIn 0.5s ease-in-out;
    position: relative;
    transition: all 0.3s ease;
}

/* Custom Fullscreen Mode */
#editorContainer.editor-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    background: white;
    padding: 1rem;
    margin: 0;
    overflow-y: auto;
}

[data-bs-theme="dark"] #editorContainer.editor-fullscreen {
    background: #1a1d20;
}

#editor_container {
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    height: auto; /* Default: auto height */
    max-height: 700px; /* Max height khi không fullscreen */
}

#editorContainer.editor-fullscreen #editor_container {
    height: calc(100vh - 100px) !important;
    max-height: none !important;
    border-radius: 0 !important;
}

[data-bs-theme="dark"] #editor_container {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

/* FileRobot Editor Customization */
.FIE_root {
    border-radius: 0.5rem !important;
    height: auto !important;
    max-height: 700px !important;
}

#editorContainer.editor-fullscreen .FIE_root {
    border-radius: 0 !important;
    height: 100% !important;
    max-height: none !important;
}

/* Image Info */
#imageInfo {
    font-weight: 500;
}

/* Fullscreen animation */
#editorContainer.editor-fullscreen {
    animation: expandFullscreen 0.3s ease-out;
}

@keyframes expandFullscreen {
    from {
        transform: scale(0.95);
        opacity: 0.9;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Auto-resize textarea */
.auto-resize-textarea {
    overflow: hidden;
    resize: none;
    min-height: 38px;
    transition: height 0.2s ease;
}

/* Form controls */
[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .toolOutput {
    background-color: #212529;
    border-color: #495057;
    color: #e9ecef;
}

[data-bs-theme="dark"] .form-control[readonly],
[data-bs-theme="dark"] .toolOutput[readonly] {
    background-color: #1a1d20;
    color: #adb5bd;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .editor-toolbar {
        padding: 0.75rem;
    }

    .editor-toolbar .btn {
        font-size: 0.875rem;
        padding: 0.375rem 0.5rem;
    }

    .editor-toolbar .vr {
        display: none;
    }

    .editor-canvas-wrapper {
        padding: 0.5rem;
    }
}

@media (max-width: 576px) {
    #imageCanvas {
        max-width: 100%;
        height: auto;
    }
}
