/* Weekly Assignments Interface - Figma Design Implementation */

.weekly-assignments-container {
	max-width: 1400px;
	margin: 0 auto;
	padding: 2rem;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Week Header with Navigation */
.week-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	margin-bottom: 10px;
	background: none;
	gap: 10px;
}

.header-left {
	display: flex;
	flex-direction: row;
	gap: 25px;
}

.header-right {
	display: flex;
	align-items: center;
	gap: 10px;
	position: relative;
}

.week-title {
	font-size: 2.5rem;
	font-weight: 400;
	color: #333;
	margin: 0;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.week-navigation {
	display: flex;
	align-items: center;
	gap: 1rem;
}

.week-nav-btn {
	background: none;
	border: none;
	padding: 0.5rem;
	cursor: pointer;
	border-radius: 6px;
	color: #666;
	transition: all 0.2s ease;
	display: flex;
	align-items: center;
	justify-content: center;
}

.week-nav-btn:hover {
	background: #f5f5f5;
	color: #333;
}

.week-display {
	font-size: 1.25rem;
	font-weight: 500;
	color: #333;
	min-width: 150px;
	text-align: center;
}

/* Section Dropdown Styles */
.section-selector {
	position: relative;
	background: white;
	padding: 0 10px;
	border-radius: 5px;
}

.section-dropdown-btn {
	cursor: pointer;
	display: flex;
	align-items: center;
	font-size: 1.25rem;
	font-weight: 500;
	color: #333;
	margin: 0;
	padding: 0.5rem 0;
	transition: color 0.2s ease;
}

.section-dropdown-btn:hover {
	color: #d4af37;
}

.section-dropdown-caret {
	transition: transform 0.2s ease;
}

.section-dropdown-btn.active .section-dropdown-caret {
	transform: rotate(180deg);
}

.section-dropdown {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	background: white;
	border: 1px solid #e1e5e9;
	border-radius: 8px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
	z-index: 50;
	max-height: 400px;
	min-width: 250px;
	overflow-y: auto;
}

.section-dropdown-item {
	padding: 0.75rem 1rem;
	cursor: pointer;
	border-bottom: 1px solid #f1f3f4;
	transition: background-color 0.15s ease;
}

.section-dropdown-item:last-child {
	border-bottom: none;
}

.section-dropdown-item:hover {
	background-color: #f9fafb;
}

.section-title {
	font-size: 1.25rem;
	font-weight: 500;
	color: #333;
	margin: 0;
	display: flex;
	align-items: center;
}

.section-dropdown-class {
	color: black;
	letter-spacing: -0.5px;
	font-size: 15px;
	text-align: left;
}
span#current-section-name {
	font-size: 18px;
	letter-spacing: 0;
}

/* Publish Button */
.publish-btn {
	background-color: var(--dark-green);
	color: white;
	border: none;
	padding: 0.75rem 1.5rem;
	border-radius: 8px;
	font-weight: 600;
	font-size: 0.95rem;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 0.5rem;
	transition: all 0.2s ease;
	box-shadow: 0 2px 4px rgba(212, 175, 55, 0.2);
}

.publish-btn:hover {
	background: linear-gradient(135deg, #c19b26 0%, #e5bd2e 100%);
	transform: translateY(-1px);
	box-shadow: 0 4px 8px rgba(212, 175, 55, 0.3);
}

.publish-btn:active {
	transform: translateY(0);
}

.publish-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	transform: none;
}

/* Hidden Controls */
.section-controls {
	display: none;
}

/* Section Selection Placeholder */
.section-selection-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 400px;
	background: #f8f9fa;
	border-radius: 8px;
	margin-bottom: 2rem;
}

.placeholder-content {
	text-align: center;
	max-width: 400px;
	padding: 2rem;
}

.placeholder-content h3 {
	margin: 0 0 0.5rem 0;
	color: #1f2937;
	font-size: 1.5rem;
	font-weight: 600;
}

.placeholder-content p {
	margin: 0;
	color: #6b7280;
	font-size: 1rem;
	line-height: 1.5;
}

/* Disabled Daily Sections */
.daily-sections.disabled {
	opacity: 0.5;
	pointer-events: none;
	user-select: none;
}

.daily-sections.disabled .daily-section {
	background: #f3f4f6;
}

.daily-sections.disabled .day-header {
	background: #e5e7eb;
}

.daily-sections.disabled input,
.daily-sections.disabled textarea,
.daily-sections.disabled select {
	background: #f9fafb;
	border-color: #e5e7eb;
	color: #9ca3af;
}

/* Daily Sections */
.daily-sections {
	display: flex;
	flex-direction: column;
	gap: 2rem;
}

.daily-section {
	background: #f8f9fa;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.day-header {
	background: linear-gradient(135deg, #d4af37 0%, #f4d03f 100%);
	padding: 5px 30px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin: 0;
}

.day-header h2 {
	margin: 0;
	font-size: 14px;
	font-weight: 600;
	color: black;
	letter-spacing: 0;
}

.header-label {
	font-size: 1.1rem;
	font-weight: 600;
	color: #2c3e50;
	letter-spacing: 0.5px;
}

.day-content {
	padding: 2rem;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 3rem;
	background: white;
}

/* Left Column - Content */
.left-column {
	display: flex;
	flex-direction: column;
	gap: 15px;
}

.links-section h4 {
	font-size: 0.9rem;
	font-weight: 600;
	color: #666;
	margin: 0 0 1rem 0;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

/* Right Column - Details and Uploads */
.right-column {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.details-section {
	display: flex;
	flex-direction: column;
	gap: 15px;
}

.uploads-section h4 {
	font-size: 0.9rem;
	font-weight: 600;
	color: #666;
	margin: 0 0 1rem 0;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

/* Form Styling */
.form-group {
	margin-bottom: 0;
}

.form-group input,
.form-group textarea,
.form-group select {
	width: 100%;
	padding: 5px 10px;
	border: 1px solid #c5d0dc;
	border-radius: 6px;
	font-family: inherit;
	font-size: 0.95rem;
	background: white;
	transition: all 0.2s ease;
	box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
	outline: none;
	border-color: #d4af37;
	box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
	color: #9ca3af;
	font-style: normal;
}

.assignment-title-input {
	font-weight: 500;
	font-size: 1rem;
}

.assignment-description-input {
	resize: vertical;
	min-height: 100px;
}

.points-input {
	max-width: 120px;
	text-align: center;
}

.class-type-select {
	background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
	background-position: right 0.75rem center;
	background-repeat: no-repeat;
	background-size: 1.5em 1.5em;
	padding-right: 3rem;
	appearance: none;
	transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* File Upload Drop Zone */
.file-drop-zone {
	border: 2px dashed #d1d5db;
	border-radius: 8px;
	padding: 10px;
	text-align: center;
	cursor: pointer;
	transition: all 0.2s ease;
	background: #fafbfc;
}

.file-drop-zone:hover,
.file-drop-zone.drag-active {
	border-color: #d4af37;
	background: #fffbf0;
}

.drop-icon {
	color: #9ca3af;
	margin-bottom: 1rem;
	display: flex;
	justify-content: center;
}

.file-drop-zone.drag-active .drop-icon {
	color: #d4af37;
}

.drop-text {
	font-size: 0.95rem;
	color: #374151;
	font-weight: 500;
	margin-bottom: 0.5rem;
}

.drop-subtext {
	font-size: 0.8rem;
	color: #6b7280;
	line-height: 1.4;
}

/* Uploaded Files Display */
.uploaded-files {
	margin-top: 1rem;
}

.uploaded-file {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0.75rem;
	background: #f8f9fa;
	border: 1px solid #e9ecef;
	border-radius: 6px;
	margin-bottom: 0.5rem;
}

.file-info {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.file-icon {
	color: #6b7280;
}

.file-details {
	display: flex;
	flex-direction: column;
}

.file-name {
	font-size: 0.9rem;
	font-weight: 500;
	color: #374151;
}

.file-size {
	font-size: 0.75rem;
	color: #6b7280;
}

.file-remove {
	background: none;
	border: none;
	color: #dc2626;
	cursor: pointer;
	padding: 0.25rem;
	border-radius: 4px;
	transition: background-color 0.2s ease;
}

.file-remove:hover {
	background: #fee2e2;
}

/* Auto-save Status */
.auto-save-status {
	position: fixed;
	bottom: 2rem;
	right: 2rem;
	background: rgba(33, 59, 45, 0.9);
	color: white;
	padding: 0.75rem 1rem;
	border-radius: 6px;
	font-size: 0.85rem;
	font-weight: 500;
	opacity: 0;
	transition: opacity 0.3s ease;
	z-index: 100;
	pointer-events: none;
}

.auto-save-status.show {
	opacity: 1;
}

.auto-save-status.success {
	background: rgba(34, 197, 94, 0.9);
}

.auto-save-status.error {
	background: rgba(239, 68, 68, 0.9);
}

/* Responsive Design */
@media (max-width: 1024px) {
	.weekly-assignments-container {
		padding: 1rem;
	}
	
	.week-header {
		flex-direction: column;
		align-items: stretch;
		gap: 1.5rem;
	}
	
	.header-right {
		justify-content: center;
	}
	
	.week-title {
		font-size: 2rem;
	}
	
	.day-content {
		grid-template-columns: 1fr;
		gap: 2rem;
	}
	
	.day-header {
		padding: 1rem 1.5rem;
		flex-direction: column;
		gap: 0.5rem;
		text-align: center;
	}
	
	.day-header h2,
	.header-label {
		font-size: 1rem;
	}
}

@media (max-width: 768px) {
	.weekly-assignments-container {
		padding: 0.75rem;
	}
	
	.week-header {
		flex-direction: column;
		gap: 1rem;
		text-align: center;
	}
	
	.week-title {
		font-size: 1.75rem;
	}
	
	.week-navigation {
		gap: 0.75rem;
	}
	
	.week-display {
		font-size: 1rem;
		min-width: 150px;
	}
	
	.day-content {
		padding: 1.5rem;
		gap: 1.5rem;
	}
	
	.daily-sections {
		gap: 1.5rem;
	}
	
	.file-drop-zone {
		padding: 1.5rem;
	}
	
	.drop-text {
		font-size: 0.9rem;
	}
	
	.drop-subtext {
		font-size: 0.75rem;
	}
}

@media (max-width: 480px) {
	.week-title {
		font-size: 1.5rem;
	}
	
	.week-display {
		font-size: 0.9rem;
		min-width: 120px;
	}
	
	.day-content {
		padding: 1rem;
		gap: 1rem;
	}
	
	.file-drop-zone {
		padding: 1rem;
	}
	
	.form-group input,
	.form-group textarea,
	.form-group select {
		padding: 0.75rem;
		font-size: 0.9rem;
	}
}

/* Form Labels */
.form-label {
	display: block;
	font-size: 0.9rem;
	font-weight: 500;
	color: #555;
	margin-bottom: 0.5rem;
}

/* Class Type Validation */
.class-type-group {
	position: relative;
}


.class-type-select.validation-error {
	border-color: #dc3545 !important;
	box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
	animation: shake 0.5s ease-in-out;
}

.class-type-select.validation-error:focus {
	border-color: #dc3545 !important;
	box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

/* Required field indicator */
.class-type-select option:first-child {
	color: #dc3545;
	font-weight: 500;
}

@keyframes shake {
	0%, 100% { transform: translateX(0); }
	10%, 30%, 50%, 70%, 90% { transform: translateX(-2px); }
	20%, 40%, 60%, 80% { transform: translateX(2px); }
}

/* Multiple Assignment Forms */
.day-assignments-container {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

.assignment-form {
	position: relative;
	background: white;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	overflow: hidden;
}

.assignment-form + .assignment-form {
	margin-top: 1rem;
}

.assignment-actions {
	position: absolute;
	top: 10px;
	right: 15px;
	z-index: 10;
}

.delete-assignment-btn {
	background: #ef4444;
	color: white;
	border: none;
	border-radius: 6px;
	padding: 0.5rem;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s ease;
	box-shadow: 0 2px 4px rgba(239, 68, 68, 0.2);
}

.delete-assignment-btn:hover {
	background: #dc2626;
	transform: translateY(-1px);
	box-shadow: 0 4px 8px rgba(239, 68, 68, 0.3);
}

.add-assignment-container {
	display: flex;
	justify-content: center;
	margin-top: 1rem;
	padding-bottom: 1rem;
}

.add-assignment-btn {
	background: #f3f4f6;
	color: #6b7280;
	border: 2px dashed #d1d5db;
	border-radius: 8px;
	padding: 0.75rem 1.5rem;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-weight: 500;
	font-size: 0.9rem;
	transition: all 0.2s ease;
}

.add-assignment-btn:hover {
	background: #e5e7eb;
	color: #374151;
	border-color: #9ca3af;
}

.add-assignment-btn svg {
	transition: transform 0.2s ease;
}

.add-assignment-btn:hover svg {
	transform: rotate(90deg);
}