/*
    gallery.css
    Estilos para a galeria de mídia e funcionalidades de vistoria.
*/

/* Estilos para a nova galeria */

.media-gallery-container {
	position: relative;
    width: 100%;
    max-width: 1160px;
    margin-top: 0px;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.2);
	transition: box-shadow 0.3s ease;
	border: 2px solid #000080;
}

.gallery-title {
    font-size: 1.5em;
    margin-bottom: 20px;
    border-bottom: 2px solid #2196F3;
    padding-bottom: 10px;
}

.gallery-content {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.thumbnail-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 120px;
    max-height: 525px;
    overflow-y: auto;
    padding: 10px;
    box-sizing: content-box;
}

.thumbnail-list::-webkit-scrollbar {
    width: 8px;
}

.thumbnail-list::-webkit-scrollbar-track {
    background: #f0f2f5;
    border-radius: 10px;
}

.thumbnail-list::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

.thumbnail-container {
    width: 100px;
    height: 80px;
	min-height: 80px;
    background-color: #f0f2f5;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease-in-out;
    position: relative;
}

.thumbnail-container:hover {
    border-color: var(--color-logo-laranja);
    transform: scale(1.05);
}

.thumbnail-container.active {
    border-color: #2196F3;
    box-shadow: 0 0 5px #2196F3;
}

.thumbnail-container img,
.thumbnail-container video {
	border: none;
    width: 100px;
    height: 80px;
	min-height: 80px;
    object-fit: cover;
}

.main-display-area {
	position: relative;
    flex-grow: 1;
    background-color: #f0f2f5;
    padding: 2px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
	max-width: 990px;
    max-height: 600px;
	overflow: hidden; /* Garante que não saia dos limites */
	border: 0px solid #000;
    border-radius: 8px;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.2);
	transition: box-shadow 0.3s ease; /* Transição para efeitos de hover */	  	
}

/*
.main-media-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-height: 540px;
    color: #999;
    font-size: 1.2em;
    text-align: center;
	padding: 0px;
	background-color: red;
	border: 2px solid #000080;
    border-radius: 8px;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.2);
	transition: box-shadow 0.3s ease;
}

.main-media {
    width: 100%;
    max-height: 540px;
	padding: 0px;
	object-fit: contain;
	border: 2px solid #fff080;
    border-radius: 8px;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.2);
	transition: box-shadow 0.3s ease;
}
*/
/*######################################################################################*/

/*
.gallery-container {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    padding: 1rem;
    background-color: #f0f4f8;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
	border: 2px solid red;
}

.thumbnail-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 80vh;
    overflow-y: auto;
    padding-right: 0.5rem;
    background-color: #e0e6f0;
    border-radius: 8px;
    flex-shrink: 0;
}

.thumbnail-container {
    width: 120px;
    height: 90px;
    cursor: pointer;
    border: 3px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.thumbnail-container img,
.thumbnail-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 8px;
}

.thumbnail-container:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.thumbnail-container.active {
    border-color: #6c63ff;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.main-display-area {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    gap: 1rem;
}
*/
.main-media-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-height: 540px;
    overflow: hidden;
	border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.2);
    transition: box-shadow 0.3s ease;	
}

.main-media,
.drawing-canvas {
    width: 100%;
    max-height: 540px;
    object-fit: contain;
    border: 0px solid #fff080;
    border-radius: 8px;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.2);
    transition: box-shadow 0.3s ease;
}

.main-media,
.log {
    overflow-y: auto;
    background-color: #f9f9f9;
    padding-left: 20px;
    border-radius: 8px;
    margin-left: 1rem 0;
    white-space: pre-wrap;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
}

.log-title {
	margin-top: -30px;
	color: #04B2D9;
	text-align: left;
	line-height: 10px;
	margin-bottom: -30px;
	padding-bottom: 0px;
}

.log-filename {
	font-style: italic;
	font-weight: normal;
	color: #666;
	text-align: left;
	line-height: 10px;
	margin-top: -40px;
	margin-bottom: 0px;
	padding-top: 0px;
	padding-bottom: 0px;
}

.log-content{
	margin-top: -20px;
}

.drawing-canvas img{
    border: 0px solid #000080;
    border-radius: 8px;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.2);
    transition: box-shadow 0.3s ease;
}

.drawing-canvas {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 100%;
    max-height: 100%;
    cursor: default;
}

.main-media-placeholder {
    font-style: italic;
    color: #666;
    text-align: center;
    padding: 2rem;
}

.main-display-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
	position: absolute;
	top: 2px;	
}

.action-button {
    background-color: #6c63ff;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.action-button:hover {
    background-color: #5752d1;
    transform: translateY(-2px);
}

.action-button[disabled] {
    pointer-events: none;
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.action-button.delete-button {
    background-color: #ff6b6b;
}

.action-button.delete-button:hover {
    background-color: #e55a5a;
}

.description-area {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    width: 100%;
    justify-content: center;
    align-items: center;	
	border: 0px solid orange;
}

#descriptionInput {
    width: 50%;
    min-height: 10px;
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
    resize: vertical;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

#descriptionInput:focus {
    border-color: #6c63ff;
    box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.2);
    outline: none;
}

#saveDescriptionButton {
    align-self: flex-end;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    text-align: center;
    max-width: 500px;
    width: 90%;
    animation: fadeIn 0.3s ease-out;
}

.modal-content.analysis-modal-content {
    text-align: left;
}

.analysis-result-container {
    max-height: 300px;
    overflow-y: auto;
    background-color: #f9f9f9;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    white-space: pre-wrap;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
}

.loading-spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border-left-color: #6c63ff;
    animation: spin 1s linear infinite;
    margin: 1rem auto;
}

.modal-actions {
    margin-top: 1.5rem;
    display: flex;
    justify-content: space-around;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    font-size: 2em;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    border-radius: 8px;
}

.thumbnail-container:hover .video-overlay {
    opacity: 1;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}
