/* Image Info Viewer Tool - Custom Styles */

/* Remove input validation borders */
.toolInput:invalid,
.toolInput:valid {
    border-color: #ced4da !important;
    box-shadow: none !important;
}

.toolInput:focus {
    border-color: #80bdff !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25) !important;
}

/* Cursor pointers for interactive elements */
.btn {
    cursor: pointer;
}

.toolBtn {
    cursor: pointer;
}

/* Button icons styling */
.toolBtn img, .btn img {
    transition: all 0.2s ease;
}

/* Dark mode button styling */
[data-bs-theme="dark"] .btn-success {
    background-color: #198754;
    border-color: #198754;
}

[data-bs-theme="dark"] .btn-success:hover {
    background-color: #157347;
    border-color: #146c43;
}

[data-bs-theme="dark"] .btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
}

[data-bs-theme="dark"] .btn-secondary:hover {
    background-color: #5c636a;
    border-color: #565e64;
}

[data-bs-theme="dark"] .btn-outline-primary {
    color: #6ea8fe;
    border-color: #6ea8fe;
}

[data-bs-theme="dark"] .btn-outline-primary:hover {
    background-color: #052c65;
    border-color: #6ea8fe;
    color: #fff;
}

[data-bs-theme="dark"] .btn-outline-success {
    color: #75b798;
    border-color: #75b798;
}

[data-bs-theme="dark"] .btn-outline-success:hover {
    background-color: #198754;
    border-color: #75b798;
    color: #fff;
}

/* Prevent text selection on badges and labels */
.badge {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    cursor: default;
}

.form-label {
    cursor: default;
}

/* Dark mode form labels */
[data-bs-theme="dark"] .form-label {
    color: #e9ecef;
}

/* Card styling */
.card-header h5 {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    cursor: default;
}

.card-header img {
    opacity: 0.8;
}

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

[data-bs-theme="dark"] .card-header {
    background-color: #1a1d20;
    border-bottom-color: #495057;
}

[data-bs-theme="dark"] .card-header h5 {
    color: #e9ecef;
}

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

/* Form controls */
.form-control {
    cursor: text;
}

.form-control[readonly] {
    cursor: default;
}

.form-select {
    cursor: pointer;
}

input[type="file"] {
    cursor: pointer;
}

/* Dark mode text elements */
[data-bs-theme="dark"] small.text-muted {
    color: #adb5bd !important;
}

[data-bs-theme="dark"] .form-text {
    color: #adb5bd !important;
}

[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:focus,
[data-bs-theme="dark"] .toolOutput:focus {
    background-color: #1a1d20;
    border-color: #052c65;
    color: #e9ecef;
}

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

/* Image preview styling */
#imagePreview {
    max-height: 300px;
    max-width: 100%;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: all 0.15s ease-in-out;
    object-fit: contain;
    user-select: none;
}

#imagePreview:hover {
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.15);
    transform: scale(1.02);
}

[data-bs-theme="dark"] #imagePreview {
    border-color: #495057;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.4);
}

[data-bs-theme="dark"] #imagePreview:hover {
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.6);
}

/* JSON code output */
.code-output {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.875rem;
    line-height: 1.5;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
}

[data-bs-theme="dark"] .code-output {
    background-color: #1a1d20;
    border-color: #495057;
    color: #e9ecef;
}

/* Button icons */
.btn-sm img {
    opacity: 0.8;
}

.btn-sm:hover img {
    opacity: 1;
}

[data-bs-theme="dark"] .btn-outline-primary img,
[data-bs-theme="dark"] .btn-outline-success img {
    filter: brightness(0) invert(1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #imagePreview {
        max-height: 250px;
    }

    .card-header {
        flex-direction: column;
        align-items: flex-start !important;
    }

    .card-header > div {
        margin-top: 0.5rem;
    }
}

/* Info section animation */
#fileInfoSection {
    animation: fadeIn 0.4s ease-out;
}

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