/* custom-object-upload.css */

.upload-modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Black background with transparency */
}

.upload-modal-content {
    background-color: #fff;
    margin: 15% auto;
    padding: 20px;
    border-radius: 5px;
    width: 80%;
    max-width: 400px;
}

#close-btn {
    background-color: #f44336;
    color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    margin-top: 10px;
}

#close-btn:hover {
    background-color: #d32f2f;
}

.infobox {
	.object-wrap {
		display: flex;
		flex-wrap: nowrap;
	}
	.number {
		display: inline-block;
	}
}

#upload-modal {
	.modal-inner {
		max-width: 500px;
        background: white;
        margin: 0 auto;
        padding: 30px;
        border-radius: 20px;
        position: relative;
	}
	.dd-text {
		position: absolute;
        margin-top: 61px;
        margin-left: 19%;
        z-index: 0;
	}
	.drop-area {
	    border: 2px dashed #ccc;
	    background-color: transparent;
	    padding: 20px;
	    text-align: center;
	    cursor: pointer;
	    min-height: 150px;
	    position: relative;
	    z-index: 1;
	    .overlay {
		    position: absolute;
		    width: 100%;
		    height: 0;
		    top: 0;
		    left: 0;
	    }
	}
	
	.drop-area:hover {
	    border-color: #007565;
	}
	
	.drop-area p {
	    font-size: 16px;
	    color: #333;
	}
	
	.drop-area input[type="file"] {
	    display: none; /* Hide the default file input */
	}
	
	#close-popup {
	    position: absolute;
	    top: 0;
	    right: 0;
	    background: #007565;
	    border: 0;
	    outline: 0;
	    padding: 5px 10px;
	    color: #ffff;
	    font-size: 12px;
	    font-weight: bold;
	    border-top-right-radius: 20px;
	    text-transform: uppercase;
	    &:hover {
		    background: #144E46;
	    }
	}
	
	/* Loader Styles */
	.loader {
	    text-align: center;
	    margin-top: 20px;
	}
	
	.spinner {
	    border: 4px solid #f3f3f3; /* Light grey */
	    border-top: 4px solid #007565; /* Blue */
	    border-radius: 50%;
	    width: 40px;
	    height: 40px;
	    animation: spin 1s linear infinite;
	    margin: 0 auto;
	}
	
	@keyframes spin {
	    0% { transform: rotate(0deg); }
	    100% { transform: rotate(360deg); }
	}
	
	.loader p {
	    margin-top: 10px;
	    font-size: 14px;
	    color: #0073aa;
	}
}

#object-upload-app {
	max-width: 1024px;
	padding: 20px 20px 0;
	margin: 30px auto 0;
	
	.info-text {
		display: block;
		width: 100%;
		border-radius: 6px;
		background-color: #007565;
		text-align: center;
		margin-bottom: 15px;
		color: #ffffff;
		padding: 5px 15px;
	}
	.top-heading {
		position: relative;
		img {
			max-width: 100%;
		}
	}
	ul {
		padding: 0;
		border: 0;
		li {
			list-style: none;
		}
	}
	.platform-map-wrap {
		width: 60%;
		padding-left: 20px;
		padding-right: 0px;
	}
	#platform-map {
		height: 400px;
		width: 100%;
		background-color: #f1f1f1;	
		border: 2px solid #2a3e42;
	}
	.map-with-list {
		display: flex;
		flex-wrap: nowrap;
	}
	#noteikumi {
		position: relative;
		z-index: 3;
		border-top: 0!important;
		padding-top: 0;
		.panel-inner {
			background-color: white;
			border-radius: 6px;
			padding: 20px 20px 0;
		}
		h2, h3 {
			margin-bottom: 15px;
		}
		p, li {
			font-size: 1.0rem;
		}
		ul li, ol li {
			margin-bottom: 10px;
		}
		ul li:last-child, ol li:last-child {
			margin-bottom: 0px;
		}
	}
	.video-wrap {
		#noteikumi { 
			.panel-inner {
				padding-bottom: 20px;
			}
		}
	}
	
	#mani-objekti {
		.object-images {
		    display: flex;
		    gap: 10px;
		}
		
		.thumbnail {
            width: 85px;
            height: 85px;
		    object-fit: cover;
		    border: 2px solid #2a3e42;
		}
		
		.loading {
		    text-align: center;
		    padding: 30px;
		    color: #666;
		}
		
		.error {
		    color: #dc3545;
		    padding: 20px;
		    text-align: center;
		}
	}
	
	#object-list,
	.visited-objects-list {
		margin-bottom: 0;
		max-width: 40%;
		max-height: 500px;
		overflow: auto;
		
		.uploaded-badge {
		    display: inline-block;
		    padding: 6px 12px;
		    background-color: #2a3e42;
		    color: white;
		    border-radius: 6px;
		    text-transform: uppercase;
		    font-size: 11px;
		    line-height: 19px;
		}
		
		.uploaded-badge i {
		    margin-right: 5px;
		}
		
		.list-group-item {
		    position: relative;
		}
		
		.list-group-item.visited .submit-photo {
		    display: none !important;
		}
		
		li {
		    padding-bottom: 15px;
            margin-bottom: 15px;
            border-bottom: 1px solid #f2f2f2;
            &:last-child {
	            border-bottom: 0;
            }
			.object-inner {
				display: flex;
				flex-wrap: nowrap;
			}
			.number {
				margin-right: 10px;
				.number-inner {
					width: 30px;
					height: 30px;
					background-image: url('./img/number-item.png');
					background-position: center center;
					background-size: cover;
					display: inline-block;
					text-align: center;
					line-height: 30px;
					font-size: 12px;
					font-weight: bold;
				}
			}
			.phone {
				white-space: nowrap;
				.icon {
					margin-left: 5px;
					margin-right: 5px;
				}
			}
			.fa-camera {
				margin-right: 5px;
			}
			.label {
				font-weight: 500;
			}
			.address {
				font-style: italic;
			}
			.object-buttons {
				margin-top: 10px;
				display: block;
			}
			.btn {
				background-color: #007565;
				font-size: 11px;
				color: #ffffff;
				text-transform: uppercase;
				&:hover {
					background-color: #144E46;
					text-decoration: none;
				}
			}
		}
		li:last-child {
			margin-bottom: 0;
		}
	}
	.visited-objects-list {
		width: 100%;
		max-width: 100%;
		max-height: auto!important;
		.visited-object {
			display: flex;
			.right-side {
				margin-left: auto;
			}
			.about {
				max-width: 70%;
			}
		}
	}
	
	#mani-objekti {
		#object-list {
			width: 100%;
		}
	}
	
    #logout-link {
		border-radius: 0;
        font-size: 1.2rem;
        padding-left: 30px;
        padding-right: 30px;
        padding: 7px 30px;
        color: #ffffff;
        background-color: #007565;
        position: absolute;
        bottom: 0;
        right: 5px;
        z-index: 4;
        border-top-right-radius: 4px;
        border-top-left-radius: 4px;
        font-weight: 300;
        &:hover {
	        text-decoration: none;
	        background-color: #144E46;
        }
        .icon {
	        display: inline-block;
	        vertical-align: middle;
	        svg {
		        display: block;
		        max-width: 20px;
		        height: auto;
		        margin-bottom: 3px;
	        }
        }
    }
	.panel-heading {
	    padding: 5px 5px 0 5px;
	    background-color: transparent;
	    z-index: 3;
	    position: relative;
	    margin-top: -49px; 
	    button {
		    border-radius: 0;
		    font-size: 1.2rem;
		    padding-left: 30px;
		    padding-right: 30px;
		    font-weight: 300;
		    border: 0;
		    color: #ffffff;
		    text-transform: uppercase;
		    letter-spacing: 0.03em;
		    transition: 300ms ease all;
		    border-top-left-radius: 4px;
		    border-top-right-radius: 4px;
	    }
	    button:not(.active):hover {
		    color: #2a3e42;
			background-color: #ffffff86;
	    }
	    button.active {
		    color: #2a3e42;
		    position: relative;
		    font-weight: 400;
	    }
	}
	.tab-pane.active {
		border: 5px solid #2a3e42;
	}
	.tab-content {
		z-index: 1;
		margin-top: 0px;
		border: 0;
	}
	.tab-pane {
		padding: 20px;
	}
}
@media(max-width: 992px) {
	#object-upload-app {
		padding-left: 0;
		padding-right: 0;
	}
	#object-upload-app .panel-heading {
		margin-top: 0;
		padding-top: 0;
		background-color: #2a3e42;
	}
	#object-upload-app .panel-heading button { 
		font-size: 0.9rem;
		padding-left: 15px;
		padding-right: 15px;
	}
	#auth-container {
		border-top: 0!important;
		padding-top: 0;
	}
	#auth-container:before {
		display: none;
	}
	#auth-container .video-wrap {
		padding-top: 0!important;
	}
	.app-footer a {
		font-size: 0.9rem!important;
	}
	#auth-container #register-form, 
	#auth-container #login-form {
		margin-bottom: 0!important;
	}
	#object-upload-app #noteikumi {
		border-top: 0!important;
		padding-left: 20px;
		padding-right: 20px;
	}
	#object-upload-app .map-with-list {
		flex-wrap: wrap;
	}
	#object-upload-app #object-list, 
	#object-upload-app .visited-objects-list {
		max-width: 100%;
		order: 2;
	}
	#object-upload-app #platform-map {
		height: 300px;
	}
	#object-upload-app .platform-map-wrap {
		width: 100%;
		padding-left: 0!important;
		order: 1;
		margin-left: 0!important;
		padding-bottom: 20px;
		max-height: auto;
    }
    #object-upload-app #logout-link {
	    font-size: 0.9rem;
	    padding: 5px 15px;
    }
}
@media(max-width: 400px) {
	#object-upload-app #logout-link {
		font-size: 0.7rem;
		padding: 5px 12px 3px;
	}
	#object-upload-app .panel-heading button {
		font-size: 0.7rem;
        padding-left: 12px;
	}
}