/* css/styles.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');
/* Base Styles */
body {
	margin: 0;
	font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
	color: #333;
	background-color: #fff;
	font-family: "Inter", sans-serif;
	  font-optical-sizing: auto;
	  font-style: normal;
}

h1 {
	font-size: 2em;
	font-weight: 300;
	color: #333;
}

/* Header */
.header {
	background-color: #f8f9fa;
	padding: 20px;
	text-align: center;
}

.toolbar {
	display: flex;
	justify-content: center;
	align-items: center;
	flex-wrap: wrap;
	margin-top: 20px;
}

.toolbar .btn,
.toolbar .input-search,
.toolbar .select-sort {
	margin: 5px;
}

/* Buttons */
.btn {
	padding: 10px 20px;
	font-size: 1em;
	border: none;
	border-radius: 30px;
	cursor: pointer;
	transition: background-color 0.3s ease;
	margin:5px;
}

.btn-primary {
	background-color: #007bff;
	color: #fff;
}

.btn-primary:hover {
	background-color: #0056b3;
}

/* Inputs */
.input-search,
.select-sort,
.input-file {
	padding: 10px;
	font-size: 1em;
	border: 1px solid #ced4da;
	border-radius: 30px;
	outline: none;
	transition: border-color 0.3s ease;
}

.input-search:focus,
.select-sort:focus,
.input-file:focus {
	border-color: #80bdff;
}

/* Grid */
.grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
	grid-gap: 20px;
	padding: 20px;
}

.image-container {
	position: relative;
	overflow: hidden;
	border-radius: 10px;
	background-color: #fff;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	height:100px;
	width:100px;
}

.grid img {
	height:auto;
max-width:250px;
	display: block;
	transition: transform 0.3s ease;
}

.grid img:hover  {
	transform: scale(1.05);
}

.image-caption {
	text-align: center;
	padding: 10px;
	font-size: 1em;
	color: #555;
}

/* Pagination */
#pagination {
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 20px;
}

#pagination button {
	padding: 10px 20px;
	margin: 0 10px;
	font-size: 1em;
	border: none;
	border-radius: 30px;
	background-color: #007bff;
	color: #fff;
	cursor: pointer;
}

#pagination button:disabled {
	background-color: #6c757d;
	cursor: not-allowed;
}

#pagination span {
	font-size: 1em;
	color: #333;
}

/* Lightbox */
.lightbox {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0,0,0,0.8);
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 1000;
}

.lightbox-content {
	background-color: #fff;
	padding: 40px;
	position: relative;
	max-width: 600px;
	width: 90%;
	border-radius: 10px;
	text-align: center;
}

.lightbox-close {
	position: absolute;
	top: 15px;
	right: 20px;
	font-size: 2em;
	color: #333;
	cursor: pointer;
}

.lightbox-close:hover {
	color: #000;
}

.image-preview ,#video-preview {

	max-width: 100%;
	margin-bottom: 20px;
	border-radius: 10px;
	max-height:50vh;
	margin-left:auto;
	margin-right:auto;
	
}

.filename-display {
	font-size: 1.2em;
	font-weight: 500;
	color: #333;
	margin-bottom: 20px;
}

#upload-form .input-file {
	margin-bottom: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
	.toolbar {
		flex-direction: column;
	}

	.grid {
		grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	}
}
.btn-danger {
	background-color: #dc3545;
	color: #fff;
	float:right;
}

.btn-danger:hover {
	background-color: #c82333;
}


#qrcode {
  float: left;
  margin-top: 0px;
  height: 100px;
  width: 100px;
}
#qrcode img{
  width:100px;
  height:100px;
}
#image-link{
	width:100%;padding:4px;
	margin-bottom:5px;
}
#image-grid video{
	pointer-events: none;
}
.toast-message {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    opacity: 0.9;
    z-index: 1000;
    transition: opacity 0.5s ease-out;
}
.toast-message.fade-out {
    opacity: 0;
}

.spinner-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.spinner {
  border: 8px solid #f3f3f3;
  border-top: 8px solid #3498db;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: spin 1s linear infinite;
}
.select-image {
  position: absolute !important;
  top:0px;
  left:0px;
  width:40px;
  height:40px;
}
.media-container {
  position: relative;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}