/**
 * Custom Modal Styles
 *
 * @package Together_Job_Board
 * @since 1.0.0
 */

/* Modal Overlay */
.tjb-modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.6);
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.tjb-modal-overlay.active {
	opacity: 1;
	visibility: visible;
}

/* Modal Container */
.tjb-modal {
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
	max-width: 500px;
	width: 100%;
	max-height: 90vh;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transform: scale(0.9);
	transition: transform 0.3s ease;
}

.tjb-modal-overlay.active .tjb-modal {
	transform: scale(1);
}

/* Modal Header */
.tjb-modal-header {
	padding: 20px 24px;
	border-bottom: 1px solid #e5e7eb;
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: #f9fafb;
}

.tjb-modal-title {
	font-size: 1.25rem;
	font-weight: 600;
	color: #1a1a1a;
	margin: 0;
}

.tjb-modal-close {
	background: none;
	border: none;
	font-size: 24px;
	color: #6b7280;
	cursor: pointer;
	padding: 0;
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 6px;
	transition: all 0.2s ease;
	line-height: 1;
}

.tjb-modal-close:hover {
	background: #e5e7eb;
	color: #1a1a1a;
}

/* Modal Body */
.tjb-modal-body {
	padding: 24px;
	flex: 1;
	overflow-y: auto;
}

.tjb-modal-message {
	font-size: 1rem;
	line-height: 1.6;
	color: #374151;
	margin: 0;
}

/* Modal Footer */
.tjb-modal-footer {
	padding: 16px 24px;
	border-top: 1px solid #e5e7eb;
	display: flex;
	justify-content: flex-end;
	gap: 12px;
	background: #f9fafb;
}

.tjb-modal-button {
	padding: 10px 20px;
	border-radius: 8px;
	font-size: 0.9375rem;
	font-weight: 500;
	cursor: pointer;
	border: 1px solid transparent;
	transition: all 0.2s ease;
	min-width: 80px;
	text-align: center;
}

.tjb-modal-button:focus {
	outline: none;
	box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

/* Button Variants */
.tjb-modal-button-primary {
	background: #2563eb;
	color: #fff;
	border-color: #2563eb;
}

.tjb-modal-button-primary:hover {
	background: #1d4ed8;
	border-color: #1d4ed8;
}

.tjb-modal-button-secondary {
	background: #fff;
	color: #374151;
	border-color: #d1d5db;
}

.tjb-modal-button-secondary:hover {
	background: #f9fafb;
	border-color: #9ca3af;
}

.tjb-modal-button-danger {
	background: #dc2626;
	color: #fff;
	border-color: #dc2626;
}

.tjb-modal-button-danger:hover {
	background: #b91c1c;
	border-color: #b91c1c;
}

.tjb-modal-button:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

/* Prevent body scroll when modal is open */
body.tjb-modal-open {
	overflow: hidden;
}

/* Responsive */
@media (max-width: 640px) {
	.tjb-modal {
		max-width: 100%;
		margin: 0;
		border-radius: 12px 12px 0 0;
	}

	.tjb-modal-overlay {
		padding: 0;
		align-items: flex-end;
	}

	.tjb-modal-header,
	.tjb-modal-body,
	.tjb-modal-footer {
		padding: 16px 20px;
	}

	.tjb-modal-footer {
		flex-direction: column-reverse;
	}

	.tjb-modal-button {
		width: 100%;
	}
}

/* Toast Notifications */
.tjb-toast {
	position: fixed;
	top: 20px;
	right: 20px;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	padding: 16px 20px;
	min-width: 300px;
	max-width: 400px;
	z-index: 1000000;
	display: flex;
	align-items: center;
	gap: 12px;
	opacity: 0;
	transform: translateX(400px);
	transition: all 0.3s ease;
	border-left: 4px solid;
}

.tjb-toast.show {
	opacity: 1;
	transform: translateX(0);
}

.tjb-toast-success {
	border-left-color: #28a745;
}

.tjb-toast-error {
	border-left-color: #dc3545;
}

.tjb-toast-info {
	border-left-color: #17a2b8;
}

.tjb-toast-icon {
	font-size: 20px;
	flex-shrink: 0;
}

.tjb-toast-success .tjb-toast-icon {
	color: #28a745;
}

.tjb-toast-error .tjb-toast-icon {
	color: #dc3545;
}

.tjb-toast-info .tjb-toast-icon {
	color: #17a2b8;
}

.tjb-toast-message {
	flex: 1;
	font-size: 14px;
	line-height: 1.5;
	color: #333;
	margin: 0;
}

.tjb-toast-close {
	background: none;
	border: none;
	font-size: 18px;
	color: #999;
	cursor: pointer;
	padding: 0;
	width: 20px;
	height: 20px;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	transition: color 0.2s;
}

.tjb-toast-close:hover {
	color: #333;
}

@media (max-width: 640px) {
	.tjb-toast {
		right: 10px;
		left: 10px;
		min-width: auto;
		max-width: none;
		transform: translateY(-100px);
	}
	
	.tjb-toast.show {
		transform: translateY(0);
	}
}

/* Share Modal */
.tjb-share-modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.6);
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.tjb-share-modal-overlay.active {
	opacity: 1;
	visibility: visible;
}

.tjb-share-modal {
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
	max-width: 500px;
	width: 100%;
	max-height: 90vh;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transform: scale(0.9);
	transition: transform 0.3s ease;
}

.tjb-share-modal-overlay.active .tjb-share-modal {
	transform: scale(1);
}

.tjb-share-modal-header {
	padding: 20px 24px;
	border-bottom: 1px solid #e5e7eb;
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: #f9fafb;
}

.tjb-share-modal-title {
	font-size: 1.25rem;
	font-weight: 600;
	color: #1a1a1a;
	margin: 0;
}

.tjb-share-modal-close {
	background: none;
	border: none;
	font-size: 24px;
	color: #6b7280;
	cursor: pointer;
	padding: 0;
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 6px;
	transition: all 0.2s ease;
	line-height: 1;
}

.tjb-share-modal-close:hover {
	background: #e5e7eb;
	color: #1a1a1a;
}

.tjb-share-modal-body {
	padding: 24px;
	flex: 1;
	overflow-y: auto;
}

.tjb-share-copy-section {
	margin-bottom: 24px;
}

.tjb-share-url-input {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #d1d5db;
	border-radius: 8px;
	font-size: 0.875rem;
	margin-bottom: 12px;
	background: #f9fafb;
	color: #374151;
}

.tjb-share-copy-button {
	width: 100%;
	padding: 10px 20px;
	background: #2563eb;
	color: #fff;
	border: 1px solid #2563eb;
	border-radius: 8px;
	font-size: 0.9375rem;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s ease;
}

.tjb-share-copy-button:hover {
	background: #1d4ed8;
	border-color: #1d4ed8;
}

.tjb-share-social-section h4 {
	font-size: 1rem;
	font-weight: 600;
	color: #1a1a1a;
	margin: 0 0 16px 0;
}

.tjb-share-social-buttons {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 12px;
}

.tjb-share-social-btn {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 16px;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	text-decoration: none;
	color: #374151;
	transition: all 0.2s ease;
	background: #fff;
}

.tjb-share-social-btn:hover {
	background: #f9fafb;
	border-color: #d1d5db;
	color: #1a1a1a;
}

.tjb-share-social-btn svg {
	flex-shrink: 0;
}

.tjb-share-social-btn span {
	font-size: 0.9375rem;
	font-weight: 500;
}

.tjb-share-facebook:hover {
	background: #1877f2;
	color: #fff;
	border-color: #1877f2;
}

.tjb-share-twitter:hover {
	background: #1da1f2;
	color: #fff;
	border-color: #1da1f2;
}

.tjb-share-linkedin:hover {
	background: #0077b5;
	color: #fff;
	border-color: #0077b5;
}

.tjb-share-email:hover {
	background: #6b7280;
	color: #fff;
	border-color: #6b7280;
}

body.tjb-share-modal-open {
	overflow: hidden;
}

@media (max-width: 640px) {
	.tjb-share-modal {
		max-width: 100%;
		margin: 0;
		border-radius: 12px 12px 0 0;
	}

	.tjb-share-modal-overlay {
		padding: 0;
		align-items: flex-end;
	}

	.tjb-share-modal-header,
	.tjb-share-modal-body {
		padding: 16px 20px;
	}

	.tjb-share-social-buttons {
		grid-template-columns: 1fr;
	}
}

