/* Custom styles for the Auction Item Description Generator app */

/* Header responsive styles */
.header-row {
    margin-bottom: 1rem;
}

/* Title styles */
.header-title {
    margin-bottom: 0.25rem;
    word-wrap: break-word;
    hyphens: auto;
}

.header-description {
    word-wrap: break-word;
    hyphens: auto;
}

/* Responsive adjustments */
@media (max-width: 767.98px) {
    /* On small screens, ensure title is on its own row */
    #header-title-container {
        margin-top: 0.5rem;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    
    .header-title {
        font-size: 1.75rem !important;
    }
    
    .header-description {
        font-size: 0.9rem;
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    /* Medium screens */
    .header-title {
        font-size: 1.8rem !important;
    }
}

@media (min-width: 992px) {
    /* Large screens - give title more space */
    #header-title-container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Custom tooltip styles for image previews */
/* Image preview section styles */
.image-preview-section {
    margin-top: 15px;
    margin-bottom: 15px;
}

/* Preview container with scrolling */
.preview-container {
    display: flex;
    flex-wrap: wrap;
    max-height: 223.5px; /* Reduced height for the container */
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 4px;
    margin: 8px;
    background-color: #f8f9fa;
}

/* Individual preview image styling with custom tooltip */
.preview-image-container {
    position: relative;
    display: inline-block;
    margin: 4px;
}

.preview-image {
    position: relative;
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    z-index: 10;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    /* Hide the default browser tooltip */
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.preview-image-remove {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 20px;
    height: 20px;
    background-color: rgba(220, 53, 69, 0.9);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.preview-image-container:hover .preview-image-remove {
    opacity: 1;
}

/* Custom tooltip */
.preview-image::before {
    content: attr(title);
    position: absolute;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.1s ease;
    visibility: hidden;
}

.preview-image:hover::before {
    opacity: 1;
    visibility: visible;
    transition-delay: 0.1s; /* Very short delay */
}

.preview-image:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.generated-descriptions-scrollable-container {
    max-height: 650px;
    overflow-y: auto;

}


/* Item group in results and upload preview */
.item-preview-group {
    margin-bottom: 20px;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 10px;
    background-color: #f8f9fa;
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 15px;
}

.item-preview-group h5, .item-preview-group h6 {
    margin-bottom: 10px;
    color: #495057;
    font-weight: 600;
}

/* Add a subtle hover effect to item groups */
/* .item-preview-group:hover {
    background-color: #e9ecef;
    transition: background-color 0.2s ease;
} */

/* Editable textarea styles */
/* .editable-textarea {
    transition: all 0.2s ease;
    border: 1px solid transparent !important;
    border-radius: 4px;
    padding: 8px;
    resize: vertical;
}

.editable-textarea:hover {
    background-color: rgba(0, 123, 255, 0.05) !important;
    border: 1px dashed #6c757d !important;
}

.editable-textarea:focus {
    background-color: #fff !important;
    border: 1px solid #80bdff !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25) !important;
    outline: none;
} */

/* Show tooltip on hover */
/* .editable-textarea:hover + .edit-tooltip,
.editable-textarea:focus + .edit-tooltip {
    display: block !important;
} */

/* Card styles */
/* .card {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
} */

/* Thumbnail styles */
.thumbnail-container {
    display: flex;
    flex-wrap: wrap;
    overflow-y: auto;
    max-height: 200px;
    border: 1px solid #ccc;
    padding: 5px;
    margin-bottom: 10px;
}

.thumbnail {
    width: 100px;
    height: 100px;
    object-fit: cover;
    cursor: pointer;
    margin: 4px;
    transition: all 0.2s ease;
}

.thumbnail:hover {
    transform: scale(1.05);
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
}

/* Feedback indicator for edits */
.edit-indicator {
    position: absolute;
    /* top: 5px;
    right: 10px;
    font-size: 12px;
    color: #28a745;
    background-color: rgba(255, 255, 255, 0.8);
    padding: 2px 5px;
    border-radius: 3px;
    z-index: 100; */
    opacity: 0;
    transition: opacity 0.3s ease;
}

.edit-indicator.show {
    opacity: 1;
    animation: fadeOut 2s forwards;
    animation-delay: 1s;
}

@keyframes fadeOut {
    0% { opacity: 1; }
    100% { opacity: 0; }
}
