.paypercut-settings {
    max-width: 960px;
	margin: 0 auto;
}

.paypercut-settings__hero {
    position: relative;
    margin-bottom: 24px;
    border-radius: 16px;
    overflow: hidden;
    background-color: #031f23;
}

.paypercut-settings__hero img {
    display: block;
    width: 100%;
    height: auto;
}

.paypercut-settings__header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.paypercut-settings__header img {
    width: 64px;
    height: 64px;
    border-radius: 16px;
}

.paypercut-settings__header h2 {
    margin: 0;
    font-size: 1.75rem;
}

.paypercut-settings__header p {
    margin: 4px 0 0;
    color: #1d2327;
    font-size: 0.95rem;
    max-width: 640px;
}

.paypercut-settings__table th label {
    font-weight: 600;
}

.paypercut-settings__section {
	margin-bottom: 32px;
	border: 1px solid #d0d7de;
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 10px 30px rgba(3, 31, 35, 0.05);
	overflow: hidden;
}

.paypercut-settings__section-header {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 0;
	padding: 18px 24px;
	background: #031f23;
}

.paypercut-settings__section-title {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	margin: 0;
	color: #fff;
	font-size: 1.2rem;
	font-weight: 600;
	letter-spacing: 0.01em;
}

.paypercut-api-key-mode-badge {
	display: inline-flex;
	align-items: center;
	min-height: 20px;
	padding: 2px 8px;
	border-radius: 5px;
	font-size: 11px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0;
	text-transform: uppercase;
}

.paypercut-api-key-mode-badge--test {
	background: #fef3c7;
	color: #7c2d12;
}

.paypercut-api-key-mode-badge--live {
	background: #dcfce7;
	color: #14532d;
}

.paypercut-section-menu {
	position: relative;
	flex: 0 0 auto;
}

.paypercut-section-menu__toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, 0.32);
	border-radius: 4px;
	background: transparent;
	color: #fff;
	cursor: pointer;
}

.paypercut-section-menu__toggle:hover,
.paypercut-section-menu__toggle:focus {
	border-color: rgba(255, 255, 255, 0.72);
	background: rgba(255, 255, 255, 0.12);
	outline: none;
	box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.paypercut-section-menu__toggle span {
	display: block;
	font-size: 20px;
	line-height: 1;
	transform: translateY(-1px);
}

.paypercut-section-menu__items {
	position: absolute;
	top: calc(100% + 8px);
	right: 0;
	z-index: 20;
	min-width: 180px;
	padding: 6px;
	border: 1px solid #d0d7de;
	border-radius: 4px;
	background: #fff;
	box-shadow: 0 10px 24px rgba(3, 31, 35, 0.18);
}

.paypercut-section-menu__items a,
.paypercut-section-menu__item {
	display: block;
	width: 100%;
	padding: 8px 10px;
	border-radius: 3px;
	border: 0;
	background: transparent;
	color: #1d2327;
	font: inherit;
	line-height: 1.4;
	text-align: left;
	text-decoration: none;
	cursor: pointer;
}

.paypercut-section-menu__items a:hover,
.paypercut-section-menu__items a:focus,
.paypercut-section-menu__item:hover,
.paypercut-section-menu__item:focus {
	background: #f6f7f7;
	color: #031f23;
	outline: none;
}

.paypercut-section-menu__item--danger {
	color: #b32d2e;
}

.paypercut-section-menu__item--danger:hover,
.paypercut-section-menu__item--danger:focus {
	color: #8a2424;
}

.paypercut-settings__table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0 12px;
	padding: 16px 24px 28px;
}

.paypercut-settings__table th {
	padding: 0;
	width: 220px;
	vertical-align: top;
	font-weight: 600;
	color: #0f172a;
	font-size: 14px;
}

.paypercut-settings__table td {
	padding: 0;
}

.paypercut-settings__table input[type='text'],
.paypercut-settings__table input[type='password'],
.paypercut-settings__table textarea {
	width: 100%;
	max-width: 420px;
	border-radius: 8px;
	border: 1px solid #c8d1d5;
	box-shadow: none;
	padding: 10px 12px;
	font-size: 14px;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.paypercut-settings__table input[type='text']:focus,
.paypercut-settings__table input[type='password']:focus,
.paypercut-settings__table textarea:focus {
	border-color: #00d084;
	box-shadow: 0 0 0 1px rgba(0, 208, 132, 0.25);
}

.paypercut-settings__table .description {
	margin-top: 6px;
	color: #475569;
}

/* Webhooks Section Styles */
.paypercut-settings__section .paypercut-webhooks {
	padding: 24px;
}

.paypercut-settings__section .paypercut-webhooks__notice.notice.inline {
	margin: 14px;
}

.paypercut-webhooks__empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 48px 24px;
	text-align: center;
	color: #646970;
}

.paypercut-webhooks__empty-icon {
	font-size: 48px;
	color: #c3c4c7;
	margin-bottom: 30px;
}

.paypercut-webhooks__empty-text {
	font-size: 14px;
	color: #646970;
	margin: 0;
}

.paypercut-webhooks__table {
	margin: 0;
	border: 1px solid #d0d7de;
	border-radius: 8px;
	overflow: hidden;
	background: #fff;
}

.paypercut-webhooks__table thead {
	background: #f6f8fa;
	border-bottom: 2px solid #d0d7de;
}

.paypercut-webhooks__table th {
	padding: 12px 16px;
	font-weight: 600;
	color: #0f172a;
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.paypercut-webhooks__table tbody tr {
	border-bottom: 1px solid #f0f0f1;
	transition: background-color 0.15s ease;
}

.paypercut-webhooks__table tbody tr:last-child {
	border-bottom: none;
}

.paypercut-webhooks__table tbody tr:hover {
	background-color: #f9fafb;
}

.paypercut-webhooks__table td {
	padding: 14px 16px;
	font-size: 14px;
	color: #1d2327;
	vertical-align: middle;
}

.paypercut-webhooks__table code {
	background: #f6f8fa;
	border: 1px solid #d0d7de;
	border-radius: 4px;
	padding: 4px 8px;
	font-size: 12px;
	font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;
	color: #0969da;
}

.paypercut-webhooks__status {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-weight: 500;
}

.paypercut-webhooks__status--active {
	color: #1a7f37;
}

.paypercut-webhooks__status--inactive {
	color: #cf222e;
}

.paypercut-webhooks__status .dashicons {
	width: 18px;
	height: 18px;
	font-size: 18px;
}

.paypercut-webhooks__events {
	color: #656d76;
	font-size: 13px;
}

.paypercut-payment-domains__table th,
.paypercut-payment-domains__table td {
	white-space: nowrap;
}

.paypercut-payment-domains__status-detail {
	margin: 6px 0 0;
	color: #646970;
	font-size: 12px;
	line-height: 1.4;
	white-space: normal;
}

.paypercut-settings__section .paypercut-payment-domains__verification-notice.notice.inline {
	margin: 0 0 16px;
}

.paypercut-settings__section > .paypercut-payment-domains__verification-notice.notice.inline {
	margin: 14px;
}

.paypercut-payment-domains__help {
	margin: 14px 0 0;
	color: #475569;
	font-size: 13px;
}

.paypercut-modal[hidden] {
	display: none;
}

.paypercut-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.paypercut-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(3, 31, 35, 0.48);
}

.paypercut-modal__dialog {
	position: relative;
	width: min(100%, 520px);
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 18px 48px rgba(3, 31, 35, 0.24);
	overflow: hidden;
}

.paypercut-modal__header,
.paypercut-modal__footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 16px 20px;
	border-bottom: 1px solid #d0d7de;
}

.paypercut-modal__footer {
	justify-content: flex-end;
	border-top: 1px solid #d0d7de;
	border-bottom: 0;
	background: #f6f8fa;
}

.paypercut-modal__header h4 {
	margin: 0;
	color: #0f172a;
	font-size: 16px;
	line-height: 1.3;
}

.paypercut-modal__close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	padding: 0;
	border: 0;
	border-radius: 4px;
	background: transparent;
	color: #475569;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
}

.paypercut-modal__close:hover,
.paypercut-modal__close:focus {
	background: #f6f7f7;
	color: #031f23;
	outline: none;
}

.paypercut-modal__body {
	padding: 20px;
}

.paypercut-modal__body p {
	margin: 0 0 16px;
	color: #1d2327;
}

.paypercut-modal__body label {
	display: block;
	margin-bottom: 6px;
	font-weight: 600;
	color: #0f172a;
}

.paypercut-modal__body input[type='text'] {
	width: 100%;
	border-radius: 6px;
	border: 1px solid #c8d1d5;
	padding: 9px 10px;
	background: #f6f8fa;
	color: #1d2327;
}

.paypercut-modal__help {
	margin-top: 10px;
	font-size: 13px;
}

.paypercut-modal__message {
	margin-top: 14px;
	padding: 10px 12px;
	border-radius: 4px;
	font-size: 13px;
}

.paypercut-modal__message--error,
.paypercut-payment-domain-modal__message--error {
	border: 1px solid #f0b4b4;
	background: #fcf0f1;
	color: #8a2424;
}

.paypercut-modal__message--success,
.paypercut-payment-domain-modal__message--success {
	border: 1px solid #b8e6bf;
	background: #edfaef;
	color: #14532d;
}

.paypercut-button-danger {
	border-color: #b32d2e !important;
	background: #b32d2e !important;
	color: #fff !important;
}

.paypercut-button-danger:hover,
.paypercut-button-danger:focus {
	border-color: #8a2424 !important;
	background: #8a2424 !important;
	color: #fff !important;
}

@media screen and (max-width: 782px) {
    .paypercut-settings__header {
        flex-direction: column;
        align-items: flex-start;
    }

    .paypercut-settings__header img {
        width: 48px;
        height: 48px;
    }

	.paypercut-settings__section {
		border-radius: 10px;
	}

	.paypercut-settings__table {
		padding: 16px 18px 24px;
	}

	.paypercut-settings__table th {
		width: auto;
		margin-bottom: 6px;
	}

	.paypercut-settings__table tr {
		display: block;
	}

	.paypercut-settings__table td {
		display: block;
	}

	.paypercut-webhooks__table,
	.paypercut-payment-domains__table {
		display: block;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}

	.paypercut-webhooks__empty {
		padding: 32px 16px;
	}

	.paypercut-webhooks__empty-icon {
		font-size: 36px;
		margin-bottom: 12px;
	}
}

.paypercut-debug-session {
	padding: 14px;
}

.paypercut-debug-session__lead {
	margin: 0 0 6px;
	font-size: 14px;
}

.paypercut-debug-session__help,
.paypercut-debug-session__meta,
.paypercut-debug-session__counters {
	margin: 0 0 6px;
	color: #50575e;
}

.paypercut-debug-session__dot {
	display: inline-block;
	width: 8px;
	height: 8px;
	margin-right: 6px;
	border-radius: 50%;
	background: #b32d2e;
}

.paypercut-debug-session__countdown {
	font-variant-numeric: tabular-nums;
	font-weight: 600;
}

.paypercut-debug-session__disclosure {
	margin: 10px 0;
	padding: 10px 12px;
	border: 1px solid #dcdcde;
	border-radius: 4px;
	background: #f6f7f7;
}

.paypercut-debug-session__disclosure summary {
	cursor: pointer;
	font-weight: 600;
}

.paypercut-debug-session__disclosure p {
	margin: 8px 0 0;
	color: #50575e;
}

.paypercut-debug-session__actions {
	margin: 12px 0 0;
}

.paypercut-debug-session__copy {
	margin-left: 4px;
}

.paypercut-debug-session__log {
	margin: 12px 0 0;
	padding: 10px 12px;
	border: 1px solid #dcdcde;
	border-radius: 4px;
	background: #f6f7f7;
}

.paypercut-debug-session__log summary {
	cursor: pointer;
	font-weight: 600;
}

.paypercut-debug-session__log-scroll {
	max-height: 340px;
	overflow: auto;
	margin-top: 8px;
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 4px;
}

.paypercut-debug-session__log-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 12px;
}

.paypercut-debug-session__log-table th,
.paypercut-debug-session__log-table td {
	text-align: left;
	padding: 6px 10px;
	border-bottom: 1px solid #f0f0f1;
	vertical-align: top;
	white-space: nowrap;
}

/* The header stays put while a long session is scrolled. */
.paypercut-debug-session__log-table thead th {
	position: sticky;
	top: 0;
	background: #f6f7f7;
	color: #50575e;
}

.paypercut-debug-session__log-table td:last-child {
	white-space: normal;
	color: #50575e;
}

.paypercut-debug-session__log-raw {
	margin-top: 8px;
}

.paypercut-debug-session__log-raw pre {
	max-height: 320px;
	overflow: auto;
	margin: 8px 0 0;
	padding: 10px;
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 4px;
	font-size: 12px;
}
