.tma-fc-is-hidden {
	display: none !important;
}

.tma-fc-share-modal {
	position: fixed;
	inset: 0;
	z-index: 100050;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

.tma-fc-share-modal.tma-fc-is-hidden {
	display: none !important;
}

.tma-fc-share-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.45);
	cursor: pointer;
}

.tma-fc-share-modal-panel {
	position: relative;
	z-index: 1;
	width: min(720px, 100%);
	max-height: 92vh;
	overflow: auto;
	background: #fff;
	border-radius: 8px;
	padding: 24px 24px 20px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.18);
}

.tma-fc-share-modal-close {
	position: absolute;
	top: 8px;
	right: 8px;
	z-index: 3;
	width: 40px;
	height: 40px;
	border: 0;
	border-radius: 999px;
	background: #f3f4f6;
	font-size: 1.75rem;
	line-height: 1;
	cursor: pointer;
	color: #374151;
}

.tma-fc-share-modal-close:hover,
.tma-fc-share-modal-close:focus {
	background: #e5e7eb;
	color: #111827;
}

.tma-fc-share-modal h3,
.tma-fc-share-modal h4 {
	margin: 0 0 0.75em;
}

.tma-fc-share-modal-notice {
	padding: 0.65em 0.85em;
	border-radius: 4px;
	background: #fff8e5;
	color: #7a5b00;
}

.tma-fc-share-modal-status {
	margin: 0 0 1em;
	padding: 0.55em 0.75em;
	border-radius: 4px;
	background: #edf7ed;
	border: 1px solid #c3e6cb;
	color: #155724;
}

.tma-fc-share-modal-status.is-success {
	background: #edf7ed;
	border-color: #c3e6cb;
	color: #155724;
}

.tma-fc-share-modal-status.is-error {
	background: #fcf0f1;
	border: 1px solid #f5c6cb;
	color: #721c24;
}

.tma-fc-share-send-status {
	margin: 0 0 0.85em;
}

.tma-fc-share-modal-actions .button.is-busy {
	opacity: 0.85;
	cursor: wait;
}

.tma-fc-share-link-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5em;
	align-items: center;
	margin-top: 0.35em;
}

.tma-fc-share-link-row input.widefat {
	flex: 1 1 100%;
	min-width: 0;
	width: 100%;
	box-sizing: border-box;
}

.tma-fc-share-modal hr {
	margin: 1.25em 0;
	border: 0;
	border-top: 1px solid #e5e7eb;
}

.tma-fc-share-modal .description {
	margin: 0 0 1em;
	color: #6b7280;
}

.tma-fc-share-workflow-note {
	margin: 0 0 1em;
	padding: 0.75em 0.9em;
	border-radius: 6px;
	background: #eff6ff;
	color: #1e3a8a;
	font-size: 0.95em;
}

.tma-fc-share-email-form {
	display: grid;
	gap: 1em;
	margin-bottom: 1.25em;
}

.tma-fc-share-field label {
	display: block;
	margin-bottom: 0.4em;
	font-weight: 600;
	color: #111827;
}

.tma-fc-share-field input.widefat,
.tma-fc-share-field textarea.widefat {
	width: 100%;
	box-sizing: border-box;
	max-width: 100%;
}

.tma-fc-share-expires-field input[type="date"] {
	max-width: 16rem;
}

.tma-fc-share-expires-field .description {
	margin: 0.45em 0 0;
}

.tma-fc-share-message-field {
	margin-bottom: 0;
}

.tma-fc-share-message-header {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.5em 1em;
	margin-bottom: 0.4em;
}

.tma-fc-share-message-header label {
	margin-bottom: 0;
}

.tma-fc-share-message-toggle.button-link {
	padding: 0;
	min-height: 0;
	line-height: 1.4;
	font-weight: 600;
	text-decoration: none;
	box-shadow: none;
}

.tma-fc-share-message-toggle.button-link:hover,
.tma-fc-share-message-toggle.button-link:focus {
	text-decoration: underline;
}

.tma-fc-share-message-preview-hint {
	margin: 0 0 0.65em;
}

.tma-fc-share-email-preview {
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	background: #f9fafb;
	overflow: hidden;
}

.tma-fc-share-email-preview-frame {
	display: block;
	width: 100%;
	min-height: 260px;
	height: 320px;
	border: 0;
	background: #fff;
}

.tma-fc-share-field textarea.widefat {
	min-height: 180px;
	resize: vertical;
}

.tma-fc-share-modal-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.65em;
	align-items: center;
	margin-top: 0.25em;
}

.tma-fc-approval-badge {
	display: inline-block;
	padding: 0.15em 0.55em;
	border-radius: 999px;
	font-size: 0.85em;
	font-weight: 600;
}

.tma-fc-approval-badge.is-pending {
	background: #fef3c7;
	color: #92400e;
}

.tma-fc-approval-badge.is-approved {
	background: #d1fae5;
	color: #065f46;
}

.tma-fc-approval-badge.is-changes {
	background: #fee2e2;
	color: #991b1b;
}

.tma-fc-pending-shares {
	margin: 1em 0;
	padding: 0;
	list-style: none;
}

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