﻿

/* Admin Panel Utility Classes */

/* Alert/Error Container - Hidden by default */
.alert-container {
    display: none;
}

/* Form error text */
.form-error {
    display: none;
}

/* Preview container - Hidden by default */
.preview-container {
    display: none;
}

/* Image preview styles */
.image-preview-wrapper {
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 5px;
    text-align: center;
}

.image-preview-wrapper img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 5px;
}

/* Document preview list - flex layout */
.doc-preview-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* Document items container - flex layout */
.doc-items-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

/* Document item wrapper */
.doc-item-wrapper {
    position: relative;
    border: 2px solid #ddd;
    padding: 8px;
    border-radius: 5px;
    background: #fff;
    transition: all 0.3s ease;
    min-width: 100px;
}

/* Document preview box */
.doc-preview-box {
    position: relative;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    border-radius: 3px;
}

/* Document icon styling */
.doc-icon {
    font-size: 32px;
    color: #007bff;
    margin-bottom: 5px;
}

/* Document checkbox positioning */
.doc-checkbox-wrapper {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
}

.doc-delete-checkbox {
    cursor: pointer;
    width: 20px;
    height: 20px;
    border: 2px solid #007bff;
    accent-color: #007bff;
}

/* Document name display */
.doc-name {
    display: block;
    word-break: break-word;
    max-width: 100px;
    margin-top: 5px;
    font-size: 11px;
}

/* Empty state container */
.empty-state {
    display: none;
}

/* File error message */
.file-error {
    display: none;
}

/* Preview box for image uploads */
.preview-box {
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 5px;
    text-align: center;
}

.preview-box img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 5px;
}

/* Photo gallery preview wrapper */
.photo-gallery-preview {
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 5px;
    max-width: 200px;
}

.photo-gallery-preview img {
    max-width: 100%;
    height: auto;
}

/* Success icon styling in JS-generated content */
.success-icon {
    font-size: 24px;
    color: #28a745;
    display: block;
}

.success-doc-name {
    display: block;
    word-break: break-word;
    max-width: 100px;
    font-size: 10px;
}

/* New document preview item */
.new-doc-preview {
    border: 1px solid #28a745;
    padding: 8px;
    border-radius: 5px;
    position: relative;
    background-color: #e8f5e9;
    min-width: 90px;
    text-align: center;
}

/* New document icon */
.new-doc-icon {
    font-size: 24px;
    color: #28a745;
    display: block;
}

/* New document badge */
.new-doc-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background-color: #28a745;
    color: white;
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 9px;
    font-weight: bold;
}

/* New document name */
.new-doc-name {
    display: block;
    word-break: break-word;
    max-width: 90px;
    margin-top: 5px;
    font-size: 10px;
}

/* Deleted document state - visual feedback */
.doc-marked-deleted {
    opacity: 0.6;
    border-color: #dc3545 !important;
    background-color: #ffe6e6 !important;
}

/* Deleted document state - visual feedback */
.doc-marked-deleted {
    opacity: 0.6;
    border-color: #dc3545 !important;
    background-color: #ffe6e6 !important;
}

/* Document container in preview list */
.doc-preview-container {
    border: 1px solid #ddd;
    padding: 8px;
    border-radius: 5px;
    text-align: center;
    min-width: 100px;
}

/* Image item wrapper for multi-image containers */
.image-item-wrapper {
    position: relative;
    border: 2px solid #ddd;
    padding: 8px;
    border-radius: 5px;
    background: #fff;
    transition: all 0.3s ease;
}

/* Image item deleted state */
.image-item-wrapper.marked-deleted {
    opacity: 0.6;
    border-color: #dc3545 !important;
    background-color: #ffe6e6 !important;
}

/* Image preview box for multi-select galleries */
.image-preview-box {
    position: relative;
    width: 100px;
    height: 100px;
}

/* Existing image thumbnail styling */
.existing-image {
    max-width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 3px;
}

/* Image checkbox wrapper - positioned absolutely */
.image-checkbox-wrapper {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
}

/* Image delete checkbox styling */
.image-delete-checkbox {
    cursor: pointer;
    width: 20px;
    height: 20px;
    border: 2px solid #007bff;
    accent-color: #007bff;
}

/* Image name display in gallery */
.image-name {
    display: block;
    word-break: break-word;
    max-width: 100px;
    margin-top: 5px;
    font-size: 11px;
}

/* Success styling for newly uploaded images */
.success-image {
    max-width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 3px;
    margin-bottom: 5px;
}

/* ===== COMMON INLINE STYLES CONVERTED TO CSS CLASSES ===== */

/* Hidden elements */
.hidden-element {
    display: none;
}

/* Alert container styling */
.alert-box-hidden {
    display: none;
}

.alert-box-visible {
    display: block;
}

/* Image preview and error styling */
.image-error-hidden {
    display: none;
}

.image-error-visible {
    display: block;
}

/* Form elements - general hidden state */
.form-element-hidden {
    display: none;
}

/* Preview container */
.preview-container-hidden {
    display: none;
}

.preview-container-visible {
    display: block;
}

/* Flex layouts for previews */
.preview-flex-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.doc-flex-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

/* Document/Image item wrapper base */
.item-wrapper {
    position: relative;
    border: 2px solid #ddd;
    padding: 8px;
    border-radius: 5px;
    background: #fff;
    transition: all 0.3s ease;
    min-width: 100px;
}

/* Document preview box */
.preview-box-container {
    position: relative;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    border-radius: 3px;
}

/* Icon container for text-align center */
.icon-center {
    text-align: center;
}

/* Document/Icon styling */
.doc-icon-style {
    font-size: 32px;
    color: #007bff;
    margin-bottom: 5px;
}

/* Checkbox wrapper absolute positioning */
.checkbox-wrapper-absolute {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
}

/* Checkbox styling */
.form-checkbox-style {
    cursor: pointer;
    width: 20px;
    height: 20px;
    border: 2px solid #007bff;
    accent-color: #007bff;
}

/* Document name text styling */
.doc-name-text {
    display: block;
    word-break: break-word;
    max-width: 100px;
    margin-top: 5px;
    font-size: 11px;
}

/* Image preview image styling */
.preview-image {
    max-width: 100%;
    height: auto;
}

/* Image container with max height */
.preview-image-container {
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 5px;
    max-width: 200px;
}

.preview-image-box {
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 5px;
    text-align: center;
}

/* Image element in preview box */
.preview-image-content {
    max-width: 100%;
    max-height: 300px;
    border-radius: 5px;
}

/* Row with padding utility */
.row-with-left-padding {
    padding-left: 10px;
}

/* Progress indicator styling */
.progress-indicator {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
}

.progress-indicator.visible {
    display: block;
}

.progress-alert {
    width: auto;
    margin: 0;
}

/* ===== DYNAMICALLY GENERATED CONTENT STYLES ===== */

/* New document preview box (for file uploads) */
.new-preview-box {
    border: 1px solid #28a745;
    padding: 8px;
    border-radius: 5px;
    position: relative;
    background-color: #e8f5e9;
    min-width: 90px;
    text-align: center;
}

/* Icon for newly added documents/files */
.new-file-icon {
    font-size: 24px;
    color: #28a745;
    display: block;
}

/* Label/name for newly added files */
.new-file-label {
    display: block;
    word-break: break-word;
    max-width: 90px;
    margin-top: 5px;
    font-size: 10px;
}

/* Badge for newly uploaded/added items */
.new-item-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background-color: #28a745;
    color: white;
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 9px;
    font-weight: bold;
}

/* Marked for deletion state */
.marked-for-deletion {
    opacity: 0.6;
    border-color: #dc3545 !important;
    background-color: #ffe6e6 !important;
}

/* Error message display in containers */
.error-message {
    display: block;
}

/* ===== FONT SIZE ADJUSTMENT CLASSES ===== */

/* Text size control classes */
body.font-size-large {
    font-size: 1.2em;
}

body.font-size-medium {
    font-size: 1.1em;
}

body.font-size-normal {
    font-size: 1.0em;
}

/* ===== IMAGE ZOOM/TRANSFORM CLASSES ===== */

/* Image zoom state - these are applied via JavaScript but using data attributes if possible */
img[data-zoom-scale] {
    transform-origin: center center;
}

