
/* Load Segoe UI from Microsoft's official Office CDN for all operating systems */
@font-face {
  font-family: "Segoe UI Web";
  src: local("Segoe UI"),
       url("https://res-1.cdn.office.net/files/fabric-cdn-prod_20220930.001/assets/fonts/segoeui-westeuropean/segoeui-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: "Segoe UI Web";
  src: local("Segoe UI Semibold"), 
       url("https://res-1.cdn.office.net/files/fabric-cdn-prod_20220930.001/assets/fonts/segoeui-westeuropean/segoeui-semibold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
}


:root {
    /* Base Variables */
    --office-body-bg: #ffffff;
    --office-body-text: #242424;
    --office-control-bg: #ffffff;
    --office-control-text: #242424;
    --office-secondary-bg: #F3F2F1;
    --office-border: #D1D1D1;
    --office-hover-bg: #EDEBE9;
    --office-input-bg: #ffffff;
}

body.light-theme {
    --office-body-bg: #ffffff;
    --office-body-text: #242424;
    --office-secondary-bg: #f1f3f4;
    --office-border: #d1d1d1;
    --office-hover-bg: #f8f9fa;
    --office-input-bg: #ffffff;
    --active-toggle-bg: #EBEBEB;
    --active-toggle-text: #242424;
    --active-checkmark-color: #0F778C;
    --toggle-unselected-bg: #ffffff;
    --chip-border: #E0E0E0;
}

body.dark-theme {
    --office-secondary-bg: #323130;
    --office-border: #484644;
    --office-hover-bg: #3b3a39;
    --office-input-bg: #292827;
    --active-toggle-bg: #0F778C;
    --active-toggle-text: #ffffff;
    --active-checkmark-color: #ffffff;
    --toggle-unselected-bg: var(--office-secondary-bg);
    --chip-border: #484644;
}

body {
    background-color: var(--office-body-bg);
    color: var(--office-body-text);
	font-family: "Segoe UI Web", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Tahoma, sans-serif !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    margin: 0;
    padding: 16px; 
    box-sizing: border-box;
    min-height: 100vh;
}

/* Ensure form elements inherit the global font */
button, input, textarea, select {
    font-family: inherit;
}

/* ═══════════════════════════════════════════════════════════════
   RTL / Hebrew layout overrides
   Applied when body has class "rtl" (Hebrew Outlook UI detected)
   ═══════════════════════════════════════════════════════════════ */

body.rtl {
    direction: rtl;
    text-align: right;
}

/* Toggle buttons – flip visual order so "Off" reads last (leftmost).
   direction:rtl makes flex row go right-to-left (puts Off on the right).
   row-reverse on the actual button container restores left-to-right order,
   giving: Entire message(right) → Attachments(mid) → Off(left). */
body.rtl .specterx-toggle {
    flex-direction: row-reverse;
}

body.rtl .specterx-toggle-option {
    font-size: 11px;
    padding: 0 4px;
    white-space: normal;
    line-height: 1.1;
}

/* Borders: with row-reverse, DOM :first-child (Off) is visually leftmost.
   It still needs a right-side separator → base border-right rule is correct.
   DOM :last-child (Entire message) is visually rightmost and needs no border
   → base :last-child { border-right: none } is still correct.
   No border-left overrides needed. */

/* Toggle group: no flex-direction override needed — direction:rtl handles it */

/* Policy label – align right */
body.rtl .specterx-policy-label {
    text-align: right;
}

/* Dropdown button – flip text alignment and arrow position */
body.rtl .specterx-dropdown-button {
    text-align: right;
}

body.rtl .specterx-dropdown-arrow {
    right: auto;
    left: 12px;
}

/* Dropdown search input – flip internal padding */
body.rtl .specterx-dropdown-search {
    left: auto;
    right: 0;
    padding: 0 12px 0 30px;
    direction: ltr;
    text-align: left;
}

body.rtl .specterx-dropdown-text {
    padding-right: 0;
    padding-left: 20px;
    direction: ltr;
    text-align: left;
}

/* Selected option checkmark – flip to left side */
body.rtl .specterx-dropdown-option[data-selected="true"]::after {
    right: auto;
    left: 16px;
}

/* Recipient section heading */
body.rtl .recipient-section h3 {
    text-align: right;
}

/* Recipient chip: direction:rtl naturally places DOM [email, X] as [X(left), email(right)] */
body.rtl .recipient-email {
    direction: ltr;
    text-align: right;
    margin-right: 0;
    margin-left: 4px;
}

/* Role dropdown arrow – flip margin */
body.rtl .recipient-role-button svg {
    margin-left: 0;
    margin-right: 6px;
}

/* Role menu – align to the opposite side */
body.rtl .recipient-role-menu {
    left: auto;
    right: 0;
}

/* Phone/password rows: do NOT override flex-direction.
   direction:rtl is inherited and aligns content naturally to the right.
   Adding row-reverse here was causing the hover layout-shift (issue #1). */

/* Phone/password text (digits) should always be LTR even in Hebrew mode */
body.rtl .recipient-phone-display span,
body.rtl .recipient-password-display span {
    direction: ltr;
    display: inline-flex;
    align-items: center;
    unicode-bidi: isolate;
}

/* Form edit rows (input + save + cancel): do NOT override flex-direction.
   With direction:rtl, flex row already flows right-to-left, so the DOM
   order [inputGroup, save, cancel] renders as [cancel(left), save, input(right)]
   — exactly what the user wants. row-reverse would cancel that. */

/* Phone input text direction stays LTR for phone numbers */
body.rtl .specterx-inline-phone-input {
    direction: ltr;
    text-align: left;
}

/* Password placeholder text direction */
body.rtl .specterx-inline-password-input {
    direction: ltr;
    text-align: left;
}

/* Country selector menu position */
body.rtl .country-selector-menu {
    left: auto;
    right: 0;
}

/* Error messages */
body.rtl .specterx-inline-error,
body.rtl .specterx-error {
    text-align: right;
}

/* Recipient main row: do NOT override flex-direction.
   direction:rtl naturally renders DOM [chip, role-dropdown] as
   [role-dropdown(left), chip(right)] — correct per issue #4.
   row-reverse was double-reversing it back to the wrong LTR order. */

/* Add phone/password links — icon before text in RTL */
body.rtl .add-phone-link,
body.rtl .add-password-link {
    flex-direction: row-reverse;
    gap: 4px;
    display: inline-flex;
    align-items: center;
}

/* Disabled send button state */
.specterx-send-disabled {
	opacity: 0.7 !important;
	cursor: not-allowed !important;
	box-shadow: none !important;
}

.specterx-send-disabled:hover {
	opacity: 1 !important;
}

.specterx-protection-bar {
	font-family: "Segoe UI Web", "Segoe UI", system-ui, -apple-system, sans-serif;
	font-size: 14px;
	color: var(--office-body-text);
	position: relative;
	padding: 4px 0px;
	margin-bottom: 0;
	transition: padding 0.2s ease, margin-bottom 0.2s ease;
}

.specterx-protection-bar.inline-compose {
	padding: 4px 16px;
}


.specterx-toggle-group {
	margin-top: 5px;
	display: flex;
	align-items: center;
	gap: 8px;
}

.specterx-toggle {
	display: flex;
    flex: 1; /* Allow toggle to fill space */
	background: var(--toggle-unselected-bg);
	border: 1px solid var(--office-border);
	border-radius: 4px;
	padding: 0;
	position: relative;
	overflow: hidden;
	box-shadow: none;
	height: 32px;
	box-sizing: border-box;
    align-items: center;
}

.specterx-add-bcc-cc-btn {
    display: inline-flex;
	background: var(--toggle-unselected-bg);
	border: 1px solid var(--office-border);
	border-radius: 4px;
	padding: 0;
	position: relative;
	overflow: hidden;
	box-shadow: none;
	height: 32px;
	box-sizing: border-box;
    align-items: center;
}

.specterx-add-bcc-cc-btn {
	font-size: 12px;
	padding: 7px;
	cursor: pointer;
}

.specterx-toggle-option {
	padding: 0 8px; /* Reduced to help centering long text like 'Entire message' */
	border-radius: 0;
	cursor: pointer;
	transition: all 0.2s ease;
	font-size: 13px;
	white-space: nowrap;
	border: none;
	border-right: 1px solid var(--office-border);
	background: transparent;
	color: var(--office-body-text);
	font-weight: 600;
	flex: 1;
	text-align: center;
	position: relative;
	pointer-events: auto;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.specterx-toggle-option:last-child {
	border-right: none;
}

.specterx-toggle-option.active {
	background: var(--active-toggle-bg, #0F778C);
	color: var(--active-toggle-text, #ffffff) !important;
	z-index: 1;
}

.specterx-toggle-option.active .toggle-checkmark {
    color: var(--active-checkmark-color, #ffffff);
}

.specterx-toggle-option:hover:not(.active),
.specterx-add-bcc-cc-btn:hover {
	background: var(--office-hover-bg);
}

.toggle-checkmark {
	position: absolute;
	left: 8px;
	top: 50%;
	transform: translateY(-50%);
	color: #0f778c;
	font-weight: bold;
	opacity: 0;
	transition: opacity 0.2s ease;
	pointer-events: none;
}

.specterx-toggle-option.active .toggle-checkmark {
	opacity: 1;
}

.specterx-controls {
	display: none;
	flex-direction: column;
	align-items: flex-start;
	gap: 8px;
	padding-left: 0;
	overflow: visible;
	max-height: 500px;
	opacity: 0;
	transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), margin-bottom 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	margin-bottom: 0;
}

.specterx-controls.expanded {
	display: flex;
	opacity: 1;
}

.specterx-policy-section {
	display: block;
	width: 100%;
}

.specterx-policy-label {
	font-size: 12px;
	font-weight: 400;
	color: var(--office-body-text);
    opacity: 0.8;
	line-height: 16px;
	margin-bottom: 8px;
	margin-top: 20px;
}

/* Policy Dropdown */
.specterx-dropdown {
	position: relative;
	width: 100%;
}

.specterx-dropdown.loading-policies {
	text-align: center;
}

.specterx-dropdown-button {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 6px 12px;
	border: none;
	background: var(--office-secondary-bg);
	border-radius: 4px;
	color: var(--office-body-text);
	font-size: 14px;
	font-weight: 400;
	cursor: pointer;
	width: 100%;
	transition: all 0.2s ease;
	position: relative;
	text-align: left;
	overflow: hidden;
}

.specterx-dropdown-button:hover {
	background: var(--office-hover-bg);
}

.specterx-dropdown-button.is-open {
    border-bottom: 2px solid #0F778C !important;
}

.specterx-dropdown-menu {
	position: fixed;
	background: var(--office-body-bg);
	border: 1px solid var(--office-border);
	border-radius: 4px;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
	z-index: 10001;
	min-width: 300px;
	max-width: 400px;
	display: none;
}

.specterx-dropdown-menu.open {
	display: block;
}

.specterx-dropdown-search {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	padding: 0 30px 0 12px;
	border: none;
	background: transparent;
	outline: none;
	color: inherit;
	font: inherit;
	opacity: 0;
	z-index: 2;
}

.specterx-dropdown-search:focus {
	opacity: 1;
}

.specterx-dropdown-search:focus + .specterx-dropdown-text {
	opacity: 0;
}

.specterx-dropdown-text {
	display: block;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	padding-right: 20px;
}

.specterx-dropdown-arrow {
	position: absolute;
	right: 12px;
	top: 50%;
	transform: translateY(-50%);
	pointer-events: none;
	transition: transform 0.2s;
}

.specterx-dropdown-options {
	max-height: 328px;
	overflow-y: auto;
	padding: 4px 0;
}

/* Scrollbar styling for dropdown */
.specterx-dropdown-options::-webkit-scrollbar {
	width: 6px;
}

.specterx-dropdown-options::-webkit-scrollbar-track {
	background: var(--office-body-bg);
	border-radius: 3px;
}

.specterx-dropdown-options::-webkit-scrollbar-thumb {
	background: var(--office-border);
	border-radius: 3px;
}

.specterx-dropdown-options::-webkit-scrollbar-thumb:hover {
	background: var(--office-hover-bg);
}

.specterx-dropdown-option {
	padding: 6px 8px;
	color: var(--office-body-text);
	font-size: 14px;
	font-weight: 400;
	cursor: pointer;
	border: none;
	transition: all 0.2s ease;
	line-height: 20px;
	word-wrap: break-word;
}

.specterx-dropdown-option:last-child {
	border-bottom: none;
}

.specterx-dropdown-option:hover {
	background: var(--office-hover-bg);
	color: var(--office-body-text);
}

.specterx-dropdown-option[data-selected="true"] {
	background: var(--office-secondary-bg);
	color: #0F778C;
	font-weight: 400;
	position: relative;
}

.specterx-dropdown-option[data-selected="true"]::after {
	content: "✓";
	position: absolute;
	right: 16px;
	top: 50%;
	transform: translateY(-50%);
	color: #1a73e8;
	font-weight: bold;
	font-size: 16px;
}

/* Searchable dropdown styles */
.specterx-dropdown-search-container {
	position: relative;
	width: 100%;
	text-align: left;
}

.specterx-dropdown-search {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	padding: 6px 30px 6px 16px; /* Match button padding */
	border: none;
	background: transparent;
	outline: none;
	color: var(--office-body-text);
	font-size: 14px; /* Match button font size */
	font-weight: 500; /* Match button font weight */
	font-family: inherit; /* Inherit font family from button */
	line-height: 1.5; /* Match button line height */
	opacity: 0;
	z-index: 2;
	box-sizing: border-box; /* Ensure padding is included in width/height */
}

/* Update the focus state to maintain styles */
.specterx-dropdown-search:focus {
	opacity: 1;
	background: var(--office-input-bg);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); /* Match button shadow */
}

.specterx-dropdown-search:focus + .specterx-dropdown-text {
	opacity: 0;
}

.specterx-dropdown-text {
	display: block;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.specterx-dropdown-search-wrapper {
	padding: 8px;
	border-bottom: 1px solid #e0e0e0;
}

.specterx-dropdown-search-input {
	width: 100%;
	padding: 8px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 14px;
}

.specterx-dropdown-options {
	max-height: 328px;
	overflow-y: auto;
}

.specterx-properties {
	display: flex;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
}

.specterx-property {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	color: #091f56;
}

.specterx-property-icon {
	width: 16px;
	height: 16px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.specterx-property-icon.lock::before {
	content: "🔒";
	font-size: 12px;
}

.specterx-property-icon.shield::before {
	content: "🛡️";
	font-size: 12px;
}

.specterx-property-icon.clock::before {
	content: "⏰";
	font-size: 12px;
}

.specterx-phone-wrapper {
	display: flex;
	align-items: center;
	gap: 4px;
}

.specterx-phone-number {
	border: 1px solid #dadce0;
	border-radius: 0 4px 4px 0;
	padding: 8px 12px;
	font-size: 14px;
	outline: none;
	min-width: 120px;
}

.specterx-phone-number:focus {
	border-color: #091f56;
	box-shadow: 0 0 0 1px #091f56;
}

.specterx-verify-buttons {
	display: flex;
	gap: 8px;
	margin-left: auto;
}

.specterx-verify-btn {
	background: #091f56;
	color: white;
	border: none;
	border-radius: 4px;
	padding: 6px 12px;
	font-size: 13px;
	cursor: pointer;
	transition: background 0.2s ease;
}

.specterx-verify-btn:hover {
	background: #1557b0;
}

.specterx-verify-btn.secondary {
	background: white;
	color: #091f56;
	border: 1px solid #dadce0;
}

.specterx-verify-btn.secondary:hover {
	background: #f8f9fa;
}

/* Send Securely Button Styles */
.specterx-send-secure {
	position: relative;
	background: #0f778c !important;
	color: white !important;
	border: 1px solid #0f778c !important;
	padding-left: 30px !important;
	padding-right: 16px !important;
	max-width: unset !important;
	border-radius: 18px !important;
}


.specterx-send-secure:hover {
	background: #0c5f6a !important;
	border-color: #0c5f6a !important;
}

/* Style the dropdown part of the send button only when protection is active */
.specterx-protection-active .specterx-send-secure + div,
.specterx-protection-active .specterx-send-secure ~ div[role="button"] {
	background: #0f778c !important;
	border-color: #0f778c !important;
}

.specterx-protection-active .specterx-send-secure:hover + div,
.specterx-protection-active .specterx-send-secure:hover ~ div[role="button"] {
	background: #0c5f6a !important;
	border-color: #0c5f6a !important;
}

/* Style the dropdown part of the send button only when protection is active */
.specterx-protection-active .specterx-send-secure.specterx-send-disabled + div,
.specterx-protection-active .specterx-send-secure.specterx-send-disabled ~ div[role="button"] {
	opacity: 0.7 !important;
	cursor: not-allowed !important;
	box-shadow: none !important;
}

.specterx-protection-active .specterx-send-secure.specterx-send-disabled:hover + div,
.specterx-protection-active .specterx-send-secure.specterx-send-disabled:hover ~ div[role="button"] {
	opacity: 1 !important;
	cursor: not-allowed !important;
	box-shadow: none !important;
}

/* Hide original send button when protection is active, but not the secure send button */
.specterx-protection-active .T-I.aoO:not(.specterx-send-secure) {
	display: none;
}

.specterx-attachment-list {
	margin-top: 8px;
	padding-top: 8px;
	border-top: 1px solid #e8eaed;
	display: none;
}

.specterx-attachment-list.visible {
	display: block;
}

.specterx-attachment-item {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 4px 0;
	font-size: 13px;
	color: #091f56;
}

.specterx-attachment-icon::before {
	content: "📎";
	margin-right: 4px;
}

.specterx-success {
	color: #34a853;
	font-size: 12px;
	margin-top: 4px;
}

/* Error states */
.specterx-error {
	color: #d93025;
	font-size: 12px;
	margin-top: 4px;
}

.specterx-phone-number.error,
.specterx-bulk-phone-field.error {
	border-color: #d93025;
}

/* Enhanced Recipient Chips - Wrapper and Extensions */
.specterx-chip-wrapper {
	display: inline-flex;
	align-items: center;
	position: relative;
	margin: 2px 4px 2px 0;
	gap: 0;
}

/* Phone Extension */
.specterx-phone-extension {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--office-body-bg);
	border: 1px solid #dadce0;
	border-left: none;
	border-right: none;
	padding: 4px 8px;
	font-size: 13px;
	color: #091f56;
	transition: all 0.2s ease;
	position: relative;
	height: auto;
	min-height: 30px;
	box-sizing: border-box;
	cursor: pointer;
}

.specterx-phone-extension:hover {
	background: #f8f9fa;
}

.phone-verified-indicator,
.phone-missing-indicator,
.phone-loading-indicator {
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	width: 18px;
	height: 18px;
}

.phone-missing-indicator .warning-icon {
	position: absolute;
	top: -3px;
	right: -4px;
	width: 10px !important;
	height: 10px !important;
	background: #fff;
	border-radius: 50%;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Editor Extension */
.specterx-editor-extension {
	display: inline-flex;
	align-items: center;
	background: var(--office-body-bg);
	border: 1px solid #dadce0;
	border-left: none;
	border-radius: 0 16px 16px 0;
	padding: 1px 8px;
	font-size: 13px;
	color: #091f56;
	transition: all 0.2s ease;
	position: relative;
	gap: 0;
	height: auto;
	min-height: 30px;
	box-sizing: border-box;
	margin-left: 0;
}

.specterx-chip-wrapper:hover .specterx-phone-extension,
.specterx-chip-wrapper:hover .specterx-editor-extension {
	background: #f8f9fa;
}

/* Phone Verification Indicators - Remove old styles */
.specterx-phone-verification-indicator {
	display: none; /* Hide old phone indicators */
}

/* Phone Input Overlay - Material Design Styles */
.specterx-scope {
	--specterx-popover-bg: #fff;
	--specterx-popover-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.302), 0 2px 6px 2px rgba(60, 64, 67, 0.149);
	--specterx-popover-border: #dadce0;
	--specterx-text-primary: #202124;
	--specterx-text-secondary: #5f6368;
	--specterx-input-bg: #f1f3f4;
	--specterx-input-border-focus: #1a73e8;
	--specterx-button-primary-bg: #1a73e8;
	--specterx-button-primary-text: #fff;
	--specterx-button-secondary-hover-bg: rgba(0, 0, 0, 0.04);
	--specterx-arrow-color: #fff;
}

.bGI.bAh.dark-mode .specterx-scope,
.bGI.bAh.dark-mode-test-on .specterx-scope {
	--specterx-popover-bg: #202124;
	--specterx-popover-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.302), 0 2px 6px 2px rgba(0, 0, 0, 0.149);
	--specterx-popover-border: #5f6368;
	--specterx-text-primary: #e8eaed;
	--specterx-text-secondary: #9aa0a6;
	--specterx-input-bg: #3c4043;
	--specterx-input-border-focus: #8ab4f8;
	--specterx-button-primary-bg: #8ab4f8;
	--specterx-button-primary-text: #202124;
	--specterx-button-secondary-hover-bg: rgba(255, 255, 255, 0.08);
	--specterx-arrow-color: #202124;
}

.specterx-phone-input-overlay {
	position: absolute;
	z-index: 10000;
	font-family: "Segoe UI Web", "Segoe UI", system-ui, -apple-system, sans-serif;
}

.specterx-phone-popover {
	position: relative;
	background: var(--specterx-popover-bg);
	border-radius: 8px;
	padding: 16px;
	box-shadow: var(--specterx-popover-shadow);
	border: 1px solid var(--specterx-popover-border);
	min-width: 350px;
	box-sizing: border-box;
}

.specterx-phone-input-container {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.specterx-country-dropdown {
	display: flex;
	align-items: center;
	gap: 6px; /* Add gap for spacing */
	padding: 0 8px;
	cursor: pointer;
	height: 100%;
	border-right: 1px solid var(--specterx-popover-border);
}

.specterx-country-dropdown:hover {
	background: var(--specterx-button-secondary-hover-bg);
}

.country-flag {
	font-size: 18px; /* Slightly larger for balance */
	line-height: 1;
	margin-top: -2px;
}

.country-code {
	color: var(--specterx-text-secondary);
	line-height: 1;
	font-size: 14px;
}

.specterx-phone-number-input {
	flex: 1;
	padding: 10px 8px;
	border: 1px solid var(--specterx-popover-border);
	border-radius: 4px;
	background: var(--specterx-popover-bg);
	color: var(--specterx-text-primary);
	font-size: 14px;
	outline: none;
	font-family: "Segoe UI Web", "Segoe UI", system-ui, -apple-system, sans-serif;
	transition: border-color 0.2s, box-shadow 0.2s;
	max-width: 130px !important;
}

.specterx-phone-number-input::placeholder {
	color: var(--specterx-text-secondary);
}

.specterx-phone-number-input:focus {
	border-color: var(--specterx-input-border-focus);
	box-shadow: 0 0 0 1px var(--specterx-input-border-focus);
}

.specterx-phone-number-input.valid {
	border-color: #34a853;
	box-shadow: 0 0 0 1px #34a853;
}

.specterx-phone-number-input.invalid {
	border-color: #d93025;
	box-shadow: 0 0 0 1px #d93025;
}

.specterx-phone-validation {
	margin-top: 8px;
	min-height: 18px;
	font-size: 12px;
	color: var(--specterx-text-secondary);
}

.specterx-phone-validation .valid-msg {
	color: #34a853;
	font-weight: 500;
}

.specterx-phone-validation .error-msg {
	color: #d93025;
	font-weight: 500;
}

.specterx-country-code-select {
	padding: 10px 14px;
	border: 1px solid var(--specterx-popover-border);
	border-radius: 4px;
	background: var(--specterx-popover-bg);
	color: var(--specterx-text-primary);
	font-size: 14px;
	outline: none;
	font-family: "Segoe UI Web", "Segoe UI", system-ui, -apple-system, sans-serif;
	transition: border-color 0.2s, box-shadow 0.2s;
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D%2724%27%20height%3D%2724%27%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%3E%3Cpath%20d%3D%27M7%2010l5%205%205-5z%27%20fill%3D%27%235f6368%27/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 10px center;
	padding-right: 36px; /* Make space for the arrow */
}

.specterx-country-code-select:focus {
	border-color: var(--specterx-input-border-focus);
	box-shadow: 0 0 0 1px var(--specterx-input-border-focus);
}

.specterx-phone-actions {
	display: flex;
	gap: 8px;
}

.specterx-phone-save,
.specterx-phone-cancel {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border: none;
	border-radius: 50%;
	cursor: pointer;
	transition: background-color 0.2s, transform 0.1s;
	background: transparent;
}

.specterx-phone-save svg path,
.specterx-phone-cancel svg path {
	transition: fill 0.2s;
}

.specterx-phone-save {
	background-color: var(--specterx-button-primary-bg);
}
.specterx-phone-save svg path {
	fill: var(--specterx-button-primary-text);
}

.specterx-phone-cancel svg path {
	fill: var(--specterx-text-secondary);
}

.specterx-phone-save:hover {
	filter: brightness(0.9);
}

.specterx-phone-cancel:hover {
	background-color: var(--specterx-button-secondary-hover-bg);
}

.specterx-phone-save:active,
.specterx-phone-cancel:active {
	transform: scale(0.95);
}

/* Disabled state for Save button */
.specterx-phone-save[disabled],
.specterx-phone-save[aria-disabled="true"] {
	opacity: 0.5;
	cursor: not-allowed;
}

.specterx-phone-save[disabled]:hover,
.specterx-phone-save[aria-disabled="true"]:hover {
	filter: none;
}

/* Popover Arrow */
.specterx-popover-arrow {
	position: absolute;
	width: 16px;
	height: 8px;
	top: -8px;
	left: 50%;
	transform: translateX(-50%);
	overflow: hidden;
}

.specterx-popover-arrow::after {
	content: "";
	position: absolute;
	width: 12px;
	height: 12px;
	background: var(--specterx-arrow-color);
	border: 1px solid var(--specterx-popover-border);
	transform: rotate(45deg);
	top: 2px;
	left: 2px;
	box-shadow: -1px -1px 1px 0 rgba(0, 0, 0, 0.05);
}

/* RTL Adjustments */
[dir="rtl"] .specterx-phone-popover {
	text-align: right;
}

[dir="rtl"] .specterx-phone-input-container {
	flex-direction: row-reverse;
}

[dir="rtl"] .specterx-phone-actions {
	flex-direction: row-reverse;
}

/* Ensure the close button container (.af6) displays items horizontally */
.specterx-chip-wrapper .afV .af6 {
	display: flex !important;
	align-items: center;
	flex-direction: row;
}

/* Old chip extension styles - kept for role functionality */
.specterx-chip-extension {
	display: none; /* Hide old combined extension */
}

.specterx-chip-role-btn {
	background: none;
	border: none;
	padding: 0;
	font-size: 13px;
	font-family: "Segoe UI Web", "Segoe UI", system-ui, -apple-system, sans-serif;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 3px;
	color: #091f56;
	transition: all 0.2s ease;
	height: 24px;
}

.specterx-chip-role-btn:hover {
	color: #0f778c;
}

.dropdown-arrow {
	font-size: 12px;
	color: #5f6368;
	margin-left: 1px;
	line-height: 1;
}

/* Editor Extension Role Menu */
.specterx-chip-role-menu {
	position: fixed;
	background: white;
	border: 1px solid #dadce0;
	border-radius: 8px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
	z-index: 10001;
	min-width: 90px;
	display: none;
	font-family: "Segoe UI Web", "Segoe UI", system-ui, -apple-system, sans-serif;
}

.specterx-chip-role-menu.open {
	display: block;
}

.specterx-chip-role-option {
	padding: 8px 12px;
	cursor: pointer;
	font-size: 13px;
	color: #091f56;
	border: none;
	background: none;
	width: 100%;
	text-align: left;
	transition: background 0.2s ease;
}

.specterx-chip-role-option:hover {
	background: #f8f9fa;
}

.specterx-chip-role-option:first-child {
	border-top-left-radius: 7px;
	border-top-right-radius: 7px;
}

.specterx-chip-role-option:last-child {
	border-bottom-left-radius: 7px;
	border-bottom-right-radius: 7px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
	.specterx-controls {
		flex-direction: column;
		align-items: flex-start;
		gap: 8px;
	}

	.specterx-properties {
		flex-direction: column;
		align-items: flex-start;
		gap: 8px;
	}
}

/* Bulk Phone Collection Modal */
.specterx-bulk-modal {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: rgba(0, 0, 0, 0.5);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 9999;
	font-family: "Google Sans", Roboto, Arial, sans-serif;
}

.specterx-bulk-modal-content {
	background: var(--specterx-popover-bg, #fff);
	border-radius: 8px;
	box-shadow: var(--specterx-popover-shadow, 0 2px 10px rgba(0, 0, 0, 0.2));
	width: 650px;
	max-width: 80vw;
	max-height: 80vh;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.specterx-bulk-modal-header {
	padding: 16px 24px;
	border-bottom: 1px solid var(--specterx-popover-border, #e0e0e0);
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.specterx-bulk-modal-title {
	font-size: 16px;
	font-weight: 500;
	color: var(--specterx-text-primary, #202124);
	margin: 0;
}

.specterx-bulk-modal-close {
	background: none;
	border: none;
	color: var(--specterx-text-secondary, #5f6368);
	font-size: 20px;
	cursor: pointer;
	padding: 4px;
	line-height: 1;
}

.specterx-bulk-modal-body {
	padding: 0px 24px;
	overflow-y: auto;
	flex-grow: 1;
	overflow-x: hidden; /* Prevent horizontal scroll */
}

/* Truncate long email addresses with ellipsis */
.specterx-bulk-recipient-email {
	flex: 1;
	color: var(--specterx-text-primary, #202124);
	font-size: 14px;
	margin-right: 12px;
	word-break: break-all;
	width: 350px;
	line-height: 140%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.specterx-bulk-recipient-item {
	display: flex;
	align-items: center;
	padding: 12px 0;
	border-bottom: 1px solid var(--specterx-popover-border, #f1f3f4);
	&:last-child {
		border-bottom: none;
	}
}

.specterx-bulk-phone-input {
	flex: 0 0 auto;
	display: flex;
	flex-direction: column; /* Stack row and validation vertically */
	gap: 0;
	width: 300px;
	justify-content: flex-end;
	align-items: stretch;
	position: relative;
}

/* Add a row for the input and country select */
.specterx-bulk-phone-input-row {
	display: flex;
	flex-direction: row;
	gap: 8px;
	width: 100%;
	align-items: stretch;
}

/* Validation below, left-aligned with phone input */
.specterx-bulk-phone-validation {
	margin-top: 4px;
	margin-left: 0;
	font-size: 12px;
	color: var(--specterx-text-secondary, #5f6368);
	text-align: left;
	position: static;
	width: 100%;
}

.specterx-bulk-country-select {
	width: 100px;
	padding: 8px;
	border: 1px solid var(--specterx-popover-border, #dadce0);
	border-radius: 4px;
	background: var(--specterx-input-bg, #fff);
	color: var(--specterx-text-primary, #202124);
	font-size: 13px;
}

.specterx-bulk-phone-field {
	flex: 1;
	padding: 8px 12px;
	border: 1px solid var(--specterx-popover-border, #dadce0);
	border-radius: 4px;
	font-size: 13px;
	background: var(--specterx-input-bg, #fff);
	color: var(--specterx-text-primary, #202124);
	margin-bottom: 0;
}

.specterx-bulk-phone-field:focus {
	border-color: var(--specterx-input-border-focus, #1a73e8);
	outline: none;
	box-shadow: 0 0 0 1px var(--specterx-input-border-focus, #1a73e8);
}

.specterx-bulk-modal-footer {
	padding: 16px 24px;
	border-top: 1px solid var(--specterx-popover-border, #e0e0e0);
	display: flex;
	justify-content: flex-end;
	gap: 8px;
}

.specterx-bulk-button {
	padding: 8px 16px;
	border-radius: 4px;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	transition: background-color 0.2s;
}

.specterx-bulk-button-cancel {
	background: transparent;
	border: 1px solid var(--specterx-popover-border, #dadce0);
	color: var(--specterx-text-primary, #202124);
}

.specterx-bulk-button-save {
	background: var(--specterx-button-primary-bg, #1a73e8);
	border: 1px solid var(--specterx-button-primary-bg, #1a73e8);
	color: var(--specterx-button-primary-text, #fff);
}

.specterx-bulk-button-cancel:hover {
	background: var(--specterx-button-secondary-hover-bg, #f8f9fa);
}

.specterx-bulk-button-save:hover {
	background: #1557b0;
	border-color: #1557b0;
}

.specterx-bulk-button-save:disabled {
	background: #bdc1c6;
	border-color: #bdc1c6;
	cursor: not-allowed;
}

/* Add valid/invalid states for bulk phone field */
.specterx-bulk-phone-field.valid {
	border-color: #34a853;
	box-shadow: 0 0 0 1px #34a853;
}

.specterx-bulk-phone-field.invalid {
	border-color: #d93025;
	box-shadow: 0 0 0 1px #d93025;
}

.specterx-bulk-phone-validation .valid-msg {
	color: #34a853;
	font-weight: 500;
}

.specterx-bulk-phone-validation .error-msg {
	color: #d93025;
	font-weight: 500;
}

/* Dark mode overrides */
.bGI.bAh.dark-mode .specterx-bulk-modal-content,
.bGI.bAh.dark-mode-test-on .specterx-bulk-modal-content {
	--specterx-popover-bg: #202124;
	--specterx-popover-border: #5f6368;
	--specterx-text-primary: #e8eaed;
	--specterx-text-secondary: #9aa0a6;
	--specterx-input-bg: #3c4043;
	--specterx-button-primary-bg: #8ab4f8;
	--specterx-button-primary-text: #202124;
	--specterx-button-secondary-hover-bg: rgba(255, 255, 255, 0.1);
}

.specterx-bulk-phone-btn {
	display: block;
	margin-top: 3px;
	background: var(--office-body-bg);
	border: 1px solid #dadce0;
	border-radius: 8px;
	color: #091f56;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	margin: 0;
	padding: 8px 16px;
	transition: background-color 0.2s;
	outline: none;
	box-shadow: none;
	user-select: none;
	text-align: center;
	text-decoration: none;
}

.specterx-bulk-phone-btn {
	display: none;
}

.specterx-bulk-phone-btn:hover {
	border-color: #4285f4;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

@keyframes spin {
	0% {
		transform: rotate(0deg);
	}
	100% {
		transform: rotate(360deg);
	}
}
.spinner {
	animation: spin 1s linear infinite;
	transform-origin: center;
}

/* Recipients List Styles */
/* Recipients List Styles */
#recipients {
	padding: 0;
	font-family: "Segoe UI Web", "Segoe UI", system-ui, -apple-system, sans-serif;
}

.recipient-section {
	margin-bottom: 0;
}

.recipient-section h3 {
	font-size: 12px;
	font-weight: 400;
	color: var(--office-body-text);
    opacity: 0.7;
	line-height: 16px;
	margin: 20px 0 8px 0;
	letter-spacing: 0.5px;
}

.recipient-section ul {
	list-style: none;
	padding: 0;
	margin: 0;
}

.recipient-item {
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin-bottom: 12px;
}

.recipient-item:last-child {
	margin-bottom: 0;
}

.recipient-main-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
}

.recipient-chip {
    display: inline-flex;
    align-items: center;
    background-color: var(--office-secondary-bg);
    border-radius: 4px;
    padding: 0 8px;
    height: 32px;
    border: 1px solid var(--chip-border);
    box-sizing: border-box;
    font-size: 12px;
	line-height: 16px;
	font-weight: 600;
    color: var(--office-body-text);
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.recipient-email {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 4px;
    flex: 1;
    min-width: 0;
}

.recipient-remove {
    cursor: pointer;
    color: #616161;
    font-size: 16px;
    margin-left: 4px;
    line-height: 1;
    display: flex;
    align-items: center;
}

.recipient-remove:hover {
    color: #202124;
}

/* Custom Role Dropdown */
.recipient-role-dropdown {
    position: relative;
	width: 90px;
}

.recipient-role-button {
    background: var(--office-secondary-bg);
    border: none;
    border-radius: 4px;
    padding: 0 12px;
    height: 32px;
    box-sizing: border-box;
    font-size: 14px;
    line-height: 20px;
    font-weight: 400;
    font-family: inherit;
    color: var(--office-body-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
	transition: background 0.2s ease;
}

.recipient-role-button:hover {
	background: var(--office-hover-bg);
}

.recipient-role-menu {
    position: fixed;
    background: var(--office-body-bg);
    border: 1px solid var(--office-border);
    border-radius: 4px;
    box-shadow: 0 4.8px 14.4px 0 rgba(0, 0, 0, 0.13), 0 0.9px 3.6px 0 rgba(0, 0, 0, 0.11);
    z-index: 10001;
    display: none;
    padding: 2px 0;
    overflow: hidden;
}

.recipient-role-menu.open {
    display: block;
}

.recipient-role-option {
    padding: 10px 16px;
    cursor: pointer;
    font-size: 14px;
    line-height: 20px;
    font-weight: 400;
    color: var(--office-body-text);
    display: flex;
    align-items: center;
}

.recipient-role-option:hover {
    background-color: var(--office-hover-bg);
}

.recipient-phone-row, .recipient-password-row {
    margin-top: 0;
    margin-bottom: 0;
}

.recipient-phone-display, .recipient-password-display {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--office-secondary-bg);
    border-radius: 4px;
    border: 1px solid var(--chip-border);
    padding: 0 12px !important;
    height: 32px;
    /* Fixed width matching the recipient email field. Longer values are
       truncated with an ellipsis inside the text span. */
    width: 190px;
    max-width: 100%;
    box-sizing: border-box;
    white-space: nowrap;
    font-size: 12px;
    font-weight: 600;
    line-height: 16px;
    color: var(--office-body-text);
    cursor: pointer;
    gap: 8px;
	transition: all 0.2s ease;
}

/* Truncate the displayed phone number / password with an ellipsis when it is
   wider than the fixed-width box, while keeping the pencil icon fully visible. */
.recipient-phone-display > span,
.recipient-password-display > span {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recipient-phone-display .specterx-pencil-icon,
.recipient-password-display .specterx-pencil-icon {
    flex: 0 0 auto;
}

.recipient-password-dots {
    letter-spacing: 2px;
    display: inline-flex;
    align-items: center;
    height: 100%;
    margin-top: -2px; /* Slight adjustment for visual center of bullet characters */
}

.recipient-phone-display:hover, .recipient-password-display:hover {
    background-color: var(--office-hover-bg);
}

.recipient-phone-display .specterx-pencil-icon, .recipient-password-display .specterx-pencil-icon {
    display: inline-block;
}

.recipient-phone-display:hover .specterx-pencil-icon path, 
.recipient-password-display:hover .specterx-pencil-icon path {
    fill: #0F778C;
}

/* Missing required phone/password — rendered as a plain link (like before) but
   red with a warning icon in front, so the empty required field is obvious. */
.add-phone-link, .add-password-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    max-width: 100%;
    font-size: 12px;
    font-weight: 600;
    line-height: 16px;
    white-space: nowrap;
    cursor: default;
    text-decoration: none;
    color: #D32029;
    background-color: transparent;
    border: none;
}

/* The "missing" prefix and warning icon stay red, with no underline. */
.add-phone-link .recipient-missing-label,
.add-password-link .recipient-missing-label {
    text-decoration: none;
}

.add-phone-link .recipient-missing-icon,
.add-password-link .recipient-missing-icon {
    flex-shrink: 0;
    color: #D32029;
}

/* Only this part is the actual link: brand teal + underline, clickable. */
.add-phone-link .recipient-missing-fill,
.add-password-link .recipient-missing-fill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #0F778C;
    text-decoration: underline;
    cursor: pointer;
}

.add-phone-link .recipient-missing-fill:hover,
.add-password-link .recipient-missing-fill:hover {
    color: #0C5F6A;
}

.add-phone-link .recipient-missing-pencil,
.add-password-link .recipient-missing-pencil {
    flex-shrink: 0;
    color: #0F778C;
}

body.dark-theme .add-phone-link,
body.dark-theme .add-password-link {
    color: #FF7875;
    background-color: transparent;
    border: none;
}

body.dark-theme .add-phone-link .recipient-missing-icon,
body.dark-theme .add-password-link .recipient-missing-icon {
    color: #FF7875;
}

body.dark-theme .add-phone-link .recipient-missing-fill,
body.dark-theme .add-password-link .recipient-missing-fill,
body.dark-theme .add-phone-link .recipient-missing-pencil,
body.dark-theme .add-password-link .recipient-missing-pencil {
    color: #4DB6CC;
}

body.dark-theme .add-phone-link .recipient-missing-fill:hover,
body.dark-theme .add-password-link .recipient-missing-fill:hover {
    color: #6FC7D9;
}

.recipient-phone-form-container {
    display: none;
    align-items: flex-start;
}

.specterx-phone-input-group {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--office-border);
    border-radius: 4px;
    background: var(--office-input-bg);
    /* Removed overflow: hidden to allow dropdown menu to be visible */
    height: 36px;
    box-sizing: border-box;
    transition: border-color 0.2s;
    position: relative;
}

.specterx-phone-input-group:focus-within {
    border-color: #0F778C;
}

.specterx-phone-input-separator {
    width: 1px;
    height: 100%;
    background-color: var(--office-border);
}

.specterx-custom-country-selector {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.country-selector-button {
    padding: 0 12px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: transparent;
    transition: background 0.2s;
    border-radius: 4px 0 0 4px; /* Maintain rounded corner without overflow:hidden */
}

.country-selector-button:hover {
    background: var(--office-hover-bg);
}

.country-flag-icon {
    width: 20px;
    height: 14px;
    object-fit: cover;
    border-radius: 1px;
    box-shadow: 0 0 1px rgba(0,0,0,0.2);
}

.country-selector-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    background: var(--office-input-bg);
    border: 1px solid var(--office-border);
    border-radius: 4px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    z-index: 10002;
    display: none;
    flex-direction: column;
    width: 260px;
    max-height: 280px;
}

.country-options-list::-webkit-scrollbar {
    width: 6px;
}

.country-options-list::-webkit-scrollbar-track {
    background: var(--office-body-bg);
}

.country-options-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.country-options-list::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

.country-selector-menu.open {
    display: flex;
}


.country-options-list {
    overflow-y: auto;
    padding: 4px 0;
}

.country-option {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    cursor: pointer;
    gap: 8px;
    transition: background 0.2s;
}

.country-option:hover {
    background: var(--office-hover-bg);
}

.country-flag-mini {
    width: 20px;
    height: 14px;
    object-fit: cover;
}

.country-name-item {
    font-size: 13px;
    color: var(--office-body-text);
    flex: 1;
}

.country-dial-item {
    font-size: 12px;
    color: var(--office-body-text);
    opacity: 0.7;
}

.specterx-inline-phone-input {
    border: none;
    padding: 0 12px;
    font-family: "Segoe UI Web", "Segoe UI", system-ui, -apple-system, sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    width: 160px;
    height: 100%;
    background: transparent;
    outline: none !important;
    color: var(--office-body-text) !important;
    box-shadow: none !important;
    box-sizing: border-box; /* Ensure padding is included in the 160px width */
}

.specterx-inline-phone-input:focus {
    outline: none !important;
    box-shadow: none !important;
}

.specterx-inline-password-input {
    border: 1px solid var(--office-border);
    padding: 0 12px;
    font-family: "Segoe UI Web", "Segoe UI", system-ui, -apple-system, sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    width: 207px; /* Matches 44px (btn) + 1px (sep) + 160px (input) + 2px (group borders) */
    height: 36px;
    border-radius: 4px;
    background: var(--office-input-bg);
    box-sizing: border-box;
    outline: none;
    color: var(--office-body-text);
    text-overflow: ellipsis;
}

.specterx-inline-password-input:focus {
    border-color: #0F778C;
}

.specterx-inline-save-btn, .specterx-inline-cancel-btn {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    transition: background 0.2s;
}

.specterx-inline-save-btn svg path {
    fill: #107C10;
}
.specterx-inline-cancel-btn svg path {
    fill: var(--office-body-text);
    opacity: 0.7;
}

.specterx-inline-save-btn:hover {
    background: #E1F1E1;
}

.specterx-inline-cancel-btn:hover {
    background: #FDE7E9;
}

/* Hide Default Password Reveal Button in Edge/IE */
input[type='password']::-ms-reveal,
input[type='password']::-ms-clear {
    display: none !important;
}

/* Hide Default Password Reveal Button in WebKit Browsers */
input[type='password']::-webkit-text-password-reveal-button {
    appearance: none !important;
    display: none !important;
}

/* Recipient Inline Form and Error Styles */
.specterx-inline-error {
    color: #d93025;
    font-size: 12px;
    margin-top: 4px;
    display: none;
}

.recipient-phone-row,
.recipient-password-row {
    margin-left: 0;
    display: flex;
    align-items: center;
    gap: 5px;
}

.recipient-phone-saving,
.recipient-password-saving {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #5f6368;
}

.recipient-phone-form-container,
.recipient-password-form-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.recipient-phone-form-row,
.recipient-password-form-row {
    display: flex;
    align-items: center;
    gap: 4px;
}

.spinner-icon {
    animation: rotate 2s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Policy Features List */
.specterx-policy-features {
	margin-top: 4px;
	background: transparent;
}

.specterx-policy-features-list {
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.specterx-policy-feature-item {
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
	padding:7px 11px;
	border-radius: 4px;
	box-sizing: border-box;
	background-color: #F0F0F0;
	border: 1px solid #E0E0E0;
    color: #616161;
    opacity: 1;
}

body.dark-theme .specterx-policy-feature-item {
    background-color: var(--office-secondary-bg);
    border-color: var(--chip-border);
    color: #C8C6C4;
}

.specterx-policy-feature-icon {
	flex-shrink: 0;
}

.specterx-policy-feature-text {
	flex: 1;
    font-family: "Segoe UI Web", "Segoe UI", system-ui, -apple-system, sans-serif;
    font-weight: 600;
    font-size: 12px;
    line-height: 16px;
    letter-spacing: 0%;
    color: #616161;
    vertical-align: middle;
}

body.dark-theme .specterx-policy-feature-text {
    color: #C8C6C4;
}

/* ── Onboarding / first-login loading indicator ────────────────────── */
@keyframes specterx-spin {
  to { transform: rotate(360deg); }
}

.specterx-dropdown .spinner {
  animation: specterx-spin 0.8s linear infinite;
  transform-origin: 12px 12px;
}

.specterx-onboarding-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 8px 0;
  color: var(--office-body-text, #5f6368);
}

.specterx-onboarding-indicator svg {
  flex-shrink: 0;
  color: #0F778C;
}

.specterx-onboarding-text {
  font-size: 13px;
  font-weight: 500;
  font-family: "Segoe UI Web", "Segoe UI", system-ui, -apple-system, sans-serif;
}

body.dark-theme .specterx-onboarding-indicator svg {
  color: #3DBBCD;
}

/* Informational placeholder shown when no compose item is available */
.specterx-placeholder {
  padding: 16px 12px;
  text-align: center;
  color: var(--office-body-text, #5f6368);
  font-size: 13px;
  font-family: "Segoe UI Web", "Segoe UI", system-ui, -apple-system, sans-serif;
  line-height: 1.5;
}

/* ── Footer Styles ────────────────────────────────────────────────── */
.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 8px 16px;
  background-color: var(--office-body-bg, #ffffff);
  border-top: 1px solid var(--chip-border, #E0E0E0);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
}

body.dark-theme .footer {
  background-color: var(--office-body-bg, #1b1b1b);
  border-top-color: #333;
}

.footer-content {
  display: flex;
  gap: 12px;
  font-family: "Segoe UI Web", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 11px;
  color: #616161;
  opacity: 0.8;
}

body.dark-theme .footer-content {
  color: #C8C6C4;
}

.footer-version {
  font-weight: 400;
}

.footer-stage {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Ensure body doesn't get cut off by fixed footer */
body {
  padding-bottom: 40px !important;
}

/* Missing required field delivery notice — a single calm "attention needed"
   line above the recipient list, matching the add-*-link chip palette. */
.specterx-missing-notice {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 16px;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    line-height: 16px;
    color: #8A6100;
    background-color: #FFF8E7;
    border: 1px solid #F2C14E;
}

.specterx-missing-notice-icon {
    flex-shrink: 0;
    margin-top: 1px;
    color: #D9920A;
}

body.dark-theme .specterx-missing-notice {
    color: #F2C14E;
    background-color: rgba(242, 193, 78, 0.12);
    border-color: rgba(242, 193, 78, 0.45);
}

body.dark-theme .specterx-missing-notice-icon {
    color: #F2C14E;
}

