/* Premium Access — Public styles */

/* Dashboard block */
.pa-dashboard-block {
	margin: 24px 0;
	padding: 20px 24px;
	background: #f9fafb;
	border: 1px solid #e5e7eb;
	border-radius: 6px;
}

.pa-dashboard-block__text { margin: 0 0 12px; }

.pa-dashboard-block__text--info    { color: #1d4ed8; }
.pa-dashboard-block__text--warning { color: #92400e; }

/* Buttons */
.pa-btn { cursor: pointer; }
.pa-btn--primary {
	background-color: #1d4ed8 !important;
	color: #fff !important;
	border-color: #1d4ed8 !important;
}
.pa-btn--primary:hover {
	background-color: #1e40af !important;
	border-color: #1e40af !important;
}
.pa-btn--small { padding: 4px 10px; font-size: 13px; }
.pa-btn:disabled { opacity: .6; cursor: not-allowed; }

/* Status badges */
.pa-status {
	display: inline-block;
	padding: 2px 10px;
	border-radius: 12px;
	font-size: 12px;
	font-weight: 600;
	white-space: nowrap;
}
.pa-status--new        { background: #dbeafe; color: #1e40af; }
.pa-status--processing { background: #fef9c3; color: #854d0e; }
.pa-status--resolved   { background: #d1fae5; color: #065f46; }
.pa-status--pending    { background: #fef3c7; color: #92400e; }

/* Inline notice */
.pa-notice {
	margin: 12px 0 0;
	padding: 10px 14px;
	border-radius: 4px;
	font-size: 14px;
}
.pa-notice--success { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
.pa-notice--error   { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.pa-notice--info    { background: #dbeafe; color: #1e40af; border: 1px solid #93c5fd; }

/* Modal */
.pa-modal__backdrop {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, .5);
	z-index: 9998;
}
.pa-modal__dialog {
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	background: #fff;
	border-radius: 8px;
	padding: 32px;
	width: 480px;
	max-width: calc(100vw - 32px);
	max-height: 90vh;
	overflow-y: auto;
	z-index: 9999;
	box-shadow: 0 16px 48px rgba(0, 0, 0, .2);
}
.pa-modal__close {
	position: absolute;
	top: 16px;
	right: 16px;
	background: none;
	border: none;
	font-size: 20px;
	cursor: pointer;
	color: #6b7280;
	line-height: 1;
	padding: 4px;
}
.pa-modal__close:hover { color: #111827; }
.pa-modal__title { margin: 0 0 8px; font-size: 20px; }
.pa-modal__desc  { margin: 0 0 20px; color: #6b7280; }

/* Forms */
.pa-form__row { margin-bottom: 18px; }

.pa-form__label {
	display: block;
	font-weight: 600;
	margin-bottom: 6px;
	font-size: 14px;
}
.pa-form__label span { color: #ef4444; margin-left: 2px; }

.pa-form__input,
.pa-form__textarea {
	width: 100%;
	box-sizing: border-box;
	padding: 9px 12px;
	border: 1px solid #d1d5db;
	border-radius: 4px;
	font-size: 14px;
	line-height: 1.5;
	transition: border-color .15s;
}
.pa-form__input:focus,
.pa-form__textarea:focus {
	border-color: #1d4ed8;
	outline: none;
	box-shadow: 0 0 0 3px rgba(29, 78, 216, .15);
}
.pa-form__input--error,
.pa-form__textarea--error { border-color: #ef4444; }

.pa-form__error {
	display: block;
	color: #ef4444;
	font-size: 12px;
	margin-top: 4px;
	min-height: 16px;
}

.pa-form__notice {
	padding: 10px 14px;
	border-radius: 4px;
	font-size: 14px;
	margin-bottom: 12px;
}

.pa-form__actions { margin-top: 8px; }

/* Premium section */
.pa-premium-section__heading {
	font-size: 20px;
	margin: 0 0 20px;
	padding-bottom: 12px;
	border-bottom: 1px solid #e5e7eb;
}

.pa-premium-section__form-wrap { margin-bottom: 48px; }

.pa-requests-table { width: 100%; border-collapse: collapse; }
.pa-requests-table th,
.pa-requests-table td {
	padding: 10px 12px;
	text-align: left;
	border-bottom: 1px solid #e5e7eb;
	vertical-align: middle;
}
.pa-requests-table th { font-weight: 600; background: #f9fafb; }

.pa-empty { color: #6b7280; font-style: italic; }

/* Message cell — preview + view button */
.pa-message-cell { max-width: 260px; }
.pa-message-preview {
	display: block;
	color: #6b7280;
	font-size: 13px;
	margin-bottom: 4px;
}
.pa-view-detail-btn {
	background: none;
	border: none;
	padding: 0;
	color: #1d4ed8;
	font-size: 13px;
	cursor: pointer;
	text-decoration: underline;
	white-space: nowrap;
}
.pa-view-detail-btn:hover { color: #1e40af; }

/* Detail dialog — natívny <dialog> element */
dialog.pa-detail-dialog {
	border: none;
	border-radius: 8px;
	padding: 0;
	width: 90%;
	max-width: 600px;
	max-height: 85vh;
	overflow-y: auto;
	box-shadow: 0 16px 48px rgba(0, 0, 0, .25);
}
dialog.pa-detail-dialog::backdrop {
	background: rgba(0, 0, 0, .5);
}
.pa-detail-dialog__header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	padding: 24px 28px 12px;
	border-bottom: 1px solid #e5e7eb;
}
.pa-detail-dialog__subject {
	margin: 0;
	font-size: 18px;
	line-height: 1.3;
	word-break: break-word;
}
.pa-detail-dialog__close {
	flex-shrink: 0;
	background: none;
	border: none;
	font-size: 20px;
	cursor: pointer;
	color: #6b7280;
	line-height: 1;
	padding: 2px 4px;
}
.pa-detail-dialog__close:hover { color: #111827; }
.pa-detail-dialog__meta {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 28px;
	color: #6b7280;
	font-size: 13px;
	border-bottom: 1px solid #f3f4f6;
}
.pa-detail-dialog__message {
	padding: 20px 28px;
	font-size: 14px;
	line-height: 1.7;
	white-space: pre-wrap;
	word-break: break-word;
}
.pa-detail-dialog__footer {
	padding: 16px 28px 24px;
	border-top: 1px solid #e5e7eb;
	display: flex;
	justify-content: flex-end;
}

/* Spinner inline */
.pa-spinner {
	display: inline-block;
	width: 14px;
	height: 14px;
	border: 2px solid rgba(255,255,255,.4);
	border-top-color: #fff;
	border-radius: 50%;
	animation: pa-spin .7s linear infinite;
	vertical-align: middle;
	margin-right: 6px;
}
@keyframes pa-spin { to { transform: rotate(360deg); } }
