/**
 * "Choose from Google Drive" (One-Click Connect): the button, its messages and "Check spreadsheets".
 * Used by the setup wizard, the form setup on the Form Listing tab, the Google API tab and the
 * Elementor panel.
 *
 * @package wpsyncsheets-elementor
 */

.wpssle-picker {
	margin: 10px 0 16px;
}

.wpssle-picker__button {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 10px 16px;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
	color: #1e293b;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.4;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.wpssle-picker__button:hover {
	border-color: #cbd5e1;
	background: #f8fafc;
	color: #1e293b;
}

.wpssle-picker__button:focus-visible {
	border-color: #4169e1;
	outline: none;
	box-shadow: 0 0 0 3px rgba(65, 105, 225, 0.15);
}

.wpssle-picker__button[disabled],
.wpssle-picker__button[aria-busy="true"] {
	opacity: 0.7;
	cursor: progress;
}

.wpssle-picker__icon {
	flex-shrink: 0;
	width: 20px;
	height: 18px;
}

.wpssle-picker .wpssle-picker__help {
	margin: 6px 0 0;
	color: #64748b;
	font-size: 13px;
	line-height: 1.5;
}

.wpssle-picker .wpssle-picker__status {
	margin: 6px 0 0;
	color: #b91c1c;
	font-size: 13px;
	line-height: 1.5;
}

/* Messages about the spreadsheet: an icon, then stacked lines. */
.wpssle-notice {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 0 0 16px;
	padding: 12px 14px;
	border: 1px solid #fde68a;
	border-radius: 8px;
	background: #fffbeb;
	color: #1e293b;
	font-size: 13px;
	line-height: 1.5;
	text-align: left;
}

.wpssle-notice > .dashicons {
	flex-shrink: 0;
	margin-top: 1px;
	color: #d97706;
}

.wpssle-notice.is-success {
	border-color: #bbf7d0;
	background: #f0fdf4;
}

.wpssle-notice.is-success > .dashicons {
	color: #16a34a;
}

.wpssle-notice.is-error {
	border-color: #fecaca;
	background: #fef2f2;
}

.wpssle-notice.is-error > .dashicons {
	color: #dc2626;
}

.wpssle-notice__body {
	flex: 1 1 auto;
	min-width: 0;
}

.wpssle-notice__body p {
	margin: 0;
	font-size: 13px;
	line-height: 1.5;
}

.wpssle-notice__body p + p {
	margin-top: 6px;
}

.wpssle-notice__body p:first-child:not(:only-child) {
	font-weight: 600;
}

/* "Choose from Google Drive" inside a message: a small button that opens the picker. */
.wpssle-picker__inline {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	margin: 0 2px;
	padding: 1px 8px;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	background: #fff;
	color: #1e293b;
	font: inherit;
	font-weight: 600;
	line-height: 1.5;
	vertical-align: baseline;
	cursor: pointer;
}

.wpssle-picker__inline:hover {
	background: #f8fafc;
}

.wpssle-picker__inline:focus-visible {
	border-color: #4169e1;
	outline: none;
	box-shadow: 0 0 0 3px rgba(65, 105, 225, 0.15);
}

.wpssle-picker__inline img {
	width: 14px;
	height: 13px;
}

/* "Check spreadsheets" on the Google API tab, with "Grant access". */
.wpssle-check-sheets {
	margin: 24px 0 0;
	padding: 20px 24px;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	background: #fff;
}

.wpssle-check-sheets__title {
	margin: 0 0 6px;
	color: #1e293b;
	font-size: 16px;
	font-weight: 600;
}

.wpssle-check-sheets__note {
	margin: 0 0 14px;
	color: #64748b;
	font-size: 13px;
	line-height: 1.5;
}

.wpssle-check-sheets__result:not(:empty) {
	margin-top: 16px;
}

.wpssle-check-sheets__summary {
	margin: 0 0 8px;
	font-weight: 600;
}

.wpssle-check-sheets__check td {
	vertical-align: top;
}

.wpssle-check-sheets__check .is-ok .dashicons {
	color: #16a34a;
}

.wpssle-check-sheets__check .is-lost .dashicons {
	color: #dc2626;
}

.wpssle-check-sheets__hint {
	display: block;
	margin-top: 6px;
	color: #475569;
	font-size: 13px;
	line-height: 1.5;
}

.wpssle-check-sheets__check .wpssle-grant-access {
	margin-top: 10px;
	padding: 6px 12px;
	font-size: 13px;
}

/* Elementor panel: the panel's own colours. */
#elementor-panel .wpssle-picker--editor .wpssle-picker__button {
	justify-content: center;
	gap: 8px;
	width: 100%;
	box-sizing: border-box;
	padding: 8px 12px;
	border: 1px solid var(--e-a-border-color, #d5d8dc);
	border-radius: 3px;
	background: transparent;
	box-shadow: none;
	color: var(--e-a-color-txt, #515962);
	font-size: 12px;
}

#elementor-panel .wpssle-picker--editor .wpssle-picker__button:hover,
#elementor-panel .wpssle-picker--editor .wpssle-picker__button:focus {
	background: var(--e-a-bg-hover, #f1f2f3);
	color: var(--e-a-color-txt-accent, #0c0d0e);
}

#elementor-panel .wpssle-picker--editor .wpssle-picker__icon {
	width: 16px;
	height: 14px;
}

#elementor-panel .wpssle-picker--editor .wpssle-picker__help,
#elementor-panel .wpssle-picker--editor .wpssle-picker__status {
	color: var(--e-a-color-txt-muted, #69727d);
	font-size: 11px;
	line-height: 1.4;
}

/* Right-to-left sites. */
.rtl .wpssle-notice {
	text-align: right;
}

.rtl .wpssle-check-sheets__check td,
.rtl .wpssle-check-sheets__check th {
	text-align: right;
}
