/* assets.css */
/* --- Sidebar Assets General Styling --- */
.assets-drag-drop-card {
	background-color: #2a2a2a;
	color: #ddd;
	padding: 10px 15px;
	margin: 10px;
	border-radius: 5px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	font-size: 0.9em;
	text-align: center;
}

.assets-magic-icon {
	font-size: 1.1em; /* Slightly larger icon */
	opacity: 0.8; /* Soften the icon */
}

.assets-header {
	display: flex;
	justify-content: flex-end; /* Align icon to the right */
	align-items: center;
	padding: 5px 10px; /* Reduced padding */
	border-bottom: 1px solid #333; /* Separator line */
	height: 35px; /* Fixed height for header */
	box-sizing: border-box;
}

.assets-upload-icon-container {
	/* Container for potential future icons */
}

.assets-icon {
	color: #ccc;
	cursor: pointer;
	font-size: 1.4em; /* Adjust size as needed */
	padding: 2px 5px;
	border-radius: 3px;
	transition: background-color 0.2s ease, color 0.2s ease;
	line-height: 1; /* Ensure icon aligns well */
	display: inline-block; /* Make it behave like text */
	user-select: none; /* Prevent text selection */
}

.assets-icon.upload-icon:hover {
	background-color: rgba(255, 255, 255, 0.1);
	color: #fff;
}

.assets-panel {
	flex: 1; /* Allow panel to take remaining space */
	overflow-y: auto; /* Enable vertical scrolling */
	padding: 0; /* Remove padding, grid will have its own */
	position: relative; /* For positioning status indicator */
	/* Custom Scrollbar */
	scrollbar-width: thin;
	scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.assets-panel::-webkit-scrollbar {
	width: 5px;
}

.assets-panel::-webkit-scrollbar-track {
	background: transparent;
}

.assets-panel::-webkit-scrollbar-thumb {
	background-color: rgba(255, 255, 255, 0.2);
	border-radius: 3px;
}

/* --- Assets Grid --- */
.assets-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(75px, 1fr)); /* Smaller min size */
	gap: 8px;
	padding: 10px; /* Padding inside the grid */
	box-sizing: border-box;
}

/* --- Individual Media Item --- */
.media-item {
	width: 100%;
	aspect-ratio: 1 / 1; /* Maintain square aspect ratio */
	background-color: #2a2a2a; /* Slightly lighter background */
	border-radius: 4px;
	overflow: hidden; /* Clip contents */
	position: relative; /* For positioning overlays or placeholders */
	cursor: pointer;
	transition: transform 0.1s ease-out, box-shadow 0.1s ease-out;
	display: flex; /* Center placeholder text */
	justify-content: center;
	align-items: center;
	border: 1px solid transparent; /* Placeholder for hover/select border */
}

.media-item:hover {
	/* transform: scale(1.03); */ /* Optional subtle zoom */
	box-shadow: 0 0 5px rgba(0, 150, 255, 0.5);
	border-color: rgba(0, 150, 255, 0.7);
}

.media-item img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover; /* Cover the area, crop if needed */
}

.media-item .placeholder {
	font-size: 0.8em;
	color: #888;
	text-align: center;
	padding: 5px;
	word-break: break-word; /* Prevent long words overflowing */
}

/* --- Delete Icon on Media Item --- */
.media-delete-icon {
	position: absolute;
	top: 5px;
	right: 5px;
	color: #aaa;
	background-color: rgba(0, 0, 0, 0.5);
	border-radius: 50%;
	width: 18px;
	height: 18px;
	font-size: 0.8em;
	display: flex;
	justify-content: center;
	align-items: center;
	cursor: pointer;
	opacity: 0; /* Initially hidden */
	transition: opacity 0.2s ease, background-color 0.2s ease, color 0.2s ease;
	user-select: none;
}

.media-item:hover .media-delete-icon {
	opacity: 1; /* Show on media-item hover */
}

.media-delete-icon:hover {
	background-color: rgba(255, 0, 0, 0.8);
	color: #fff;
}


/* --- Status Indicator & Prompts --- */
.assets-status-indicator {
	padding: 15px;
	text-align: center;
	color: #ccc;
	font-style: italic;
	position: absolute; /* Allow overlaying */
	top: 10px; /* Position near top */
	left: 10px;
	right: 10px;
	background: rgba(30, 30, 30, 0.8); /* Semi-transparent background */
	border-radius: 4px;
	z-index: 5; /* Ensure it's above grid items if absolutely positioned */
	display: none; /* Handled by JS */
}

.assets-status-indicator.error {
	color: #ff6b6b; /* Reddish color for errors */
	font-style: normal;
	font-weight: bold;
}

.assets-prompt {
	padding: 15px;
	text-align: center;
	color: #ccc;
	background-color: #2a2a2a;
	border-radius: 5px;
	/* Grid will handle placement, remove absolute positioning */
	grid-column: 1 / -1; /* Span all columns if placed inside grid */
}

.prompt-button {
	padding: 8px 15px;
	border-radius: 5px;
	cursor: pointer;
	font-size: 14px;
	border: none;
	color: #fff;
	background-color: #4a4a4a;
	transition: background-color 0.2s ease;
	flex: 1; /* Make buttons share space */
	max-width: 120px;
}
.prompt-button.signup-button {
    background-color: #007bff; /* Example blue */
}

.prompt-button.login-button {
    background-color: #28a745; /* Example green */
}

.prompt-button:hover {
	filter: brightness(1.1);
}

/* --- Image Modal Styles --- */
.image-modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.8); /* Darker overlay for image modal */
	display: flex;
	justify-content: center;
	align-items: center;
	z-index: 2200; /* Higher than upload modal if needed */
}

.image-modal-content {
	background-color: #222;
	border-radius: 8px;
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
	position: relative;
	max-width: 90%; /* Responsive max width */
	max-height: 90%; /* Responsive max height */
	overflow: hidden; /* Clip image if it overflows */
}

.image-modal-image {
	display: block;
	max-width: 100%;
	max-height: 100%;
	object-fit: contain; /* Fit image inside modal */
}


/* --- Upload Modal Styles (Copied and Prefixed/Adjusted from Storage.css) --- */
.modal-overlay-storage {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.65); /* Darker overlay */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2100; /* Ensure it's above editor UI */
}

.upload-modal-content-storage {
  background-color: #1f1f1f; /* Darker modal background */
  padding: 25px 30px;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
  position: relative;
  color: #e0e0e0; /* Lighter text */
  width: 90%; /* Responsive width */
  max-width: 450px; /* Slightly smaller max-width */
  max-height: 85vh; /* Limit height */
  overflow-y: auto;
  text-align: center;
  border: 1px solid #333;
  /* Custom Scrollbar for modal */
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}
.upload-modal-content-storage::-webkit-scrollbar { width: 5px; }
.upload-modal-content-storage::-webkit-scrollbar-track { background: transparent; }
.upload-modal-content-storage::-webkit-scrollbar-thumb { background-color: rgba(255, 255, 255, 0.2); border-radius: 3px; }


.modal-close-button-storage {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  color: #aaa;
  border: none;
  font-size: 1.5em; /* Larger close icon */
  line-height: 1;
  cursor: pointer;
  padding: 5px;
}

.modal-close-button-storage:hover {
  color: #ff6b6b; /* Red on hover */
}

.modal-title-storage {
  font-size: 1.4em;
  margin-bottom: 25px;
  color: #fff;
  font-weight: 500;
}

.upload-form-storage {
  display: flex;
  flex-direction: column;
  gap: 18px; /* Slightly more gap */
}

/* --- File Preview --- */
.file-preview-container-storage {
  max-height: 180px; /* Reduced max height */
  margin-bottom: 10px; /* Space below preview */
  border-radius: 5px;
  display: flex; /* Keeps centering behavior */
  justify-content: center;
  align-items: center;
  background-color: #2a2a2a;
  overflow: hidden;
}

.file-preview-image-storage,
.file-preview-video-storage {
  display: block;
  max-width: 100%;
  max-height: 180px; /* Match container */
  object-fit: contain; /* Show whole preview */
  border-radius: 4px; /* Match container rounding */
}

/* --- Drop Area --- */
.upload-drop-area-storage {
  border: 2px dashed #555; /* Darker dashed border */
  border-radius: 8px;
  padding: 25px; /* More padding */
  text-align: center;
  cursor: pointer;
  color: #888; /* Lighter placeholder text */
  transition: border-color 0.3s ease, background-color 0.3s ease;
  background-color: #2a2a2a; /* Dark background for drop area */
}

.upload-drop-area-storage.dragging-storage {
  border-color: #00aaff; /* Bright blue border when dragging */
  background-color: #333; /* Slightly lighter background when dragging */
  color: #fff;
}

.upload-drop-area-storage p {
	margin-bottom: 10px;
	pointer-events: none; /* Prevent text blocking drop */
}

.file-input-storage {
  display: none; /* Keep hidden */
}

.file-input-label-storage {
  background-color: #007bff; /* Blue button */
  color: #fff;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  display: inline-block;
  margin-top: 10px;
  font-size: 0.9em;
  transition: background-color 0.2s ease;
}
.file-input-label-storage:hover {
	background-color: #0056b3; /* Darker blue */
}

.selected-file-name-storage {
  margin-top: 15px;
  color: #ccc;
  font-size: 0.9em;
  word-break: break-all; /* Prevent long names breaking layout */
}

/* --- Upload Status --- */
.upload-status-storage {
	margin-top: 10px;
	padding: 8px;
	border-radius: 4px;
	font-size: 0.9em;
	display: none; /* Controlled by JS */
}
.upload-status-storage.uploading {
	color: #eee;
	background-color: rgba(80, 80, 80, 0.5);
}
.upload-status-storage.success {
	color: #a0e8a0; /* Light green */
	background-color: rgba(0, 100, 0, 0.5); /* Dark green background */
}
.upload-status-storage.error {
	color: #ffabab; /* Light red */
	background-color: rgba(100, 0, 0, 0.5); /* Dark red background */
}


/* --- Modal Actions --- */
.modal-actions-storage {
  margin-top: 25px;
  display: flex;
  justify-content: flex-end; /* Align buttons right */
  gap: 12px;
}

.upload-modal-button-storage { /* Base style for both buttons */
  padding: 10px 25px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1em;
  border: none;
  color: #fff;
  transition: background-color 0.2s ease, opacity 0.2s ease;
}

.modal-confirm-button-storage { /* Upload Button */
  background-color: #28a745; /* Green */
}
.modal-confirm-button-storage:hover:not(:disabled) {
  background-color: #218838; /* Darker Green */
}
.modal-confirm-button-storage:disabled {
  background-color: #555;
  cursor: not-allowed;
  opacity: 0.6;
}

.modal-cancel-button-storage { /* Cancel Button */
  background-color: #6c757d; /* Gray */
}
.modal-cancel-button-storage:hover {
  background-color: #5a6268; /* Darker Gray */
}