/* RASA Product Request Plugin - Stylesheet */

:root {
	--rpr-primary: #6320ee;
	--rpr-text: #222222;
	--rpr-bg: #ffffff;
	--rpr-border: #e2e2e2;
	--rpr-btn-text: #ffffff;
	--rpr-radius: 10px;
}

/* ==========================================================
   Front-end: request form + user panel
   ========================================================== */

.rpr-form-wrapper,
.rpr-panel-wrapper {
	direction: rtl;
	font-family: inherit;
	color: var(--rpr-text);
	max-width: 480px;
	margin: 0 auto;
	background: var(--rpr-bg);
	border: 1px solid var(--rpr-border);
	border-radius: var(--rpr-radius);
	padding: 28px 24px;
	box-shadow: 0 2px 14px rgba(0,0,0,0.06);
}

.rpr-panel-wrapper {
	max-width: 100%;
}

.rpr-form-title,
.rpr-panel-title {
	margin: 0 0 20px 0;
	font-size: 20px;
	font-weight: 700;
	font-family: inherit;
	color: var(--rpr-text);
	border-bottom: 2px solid var(--rpr-primary);
	padding-bottom: 10px;
}

.rpr-field {
	margin-bottom: 16px;
}

.rpr-field label {
	display: block;
	margin-bottom: 6px;
	font-size: 14px;
	font-weight: 600;
	font-family: inherit;
}

.rpr-required { color: #e0434c; }
.rpr-optional { color: #999; font-weight: 400; font-size: 12px; }

.rpr-field input[type="text"],
.rpr-field input[type="tel"],
.rpr-field select {
	width: 100%;
	box-sizing: border-box;
	padding: 10px 12px;
	border: 1px solid var(--rpr-border);
	border-radius: calc(var(--rpr-radius) / 2);
	font-size: 14px;
	background: #fff;
	color: var(--rpr-text);
	font-family: inherit;
}

.rpr-field input:focus,
.rpr-field select:focus {
	outline: none;
	border-color: var(--rpr-primary);
}

.rpr-submit-btn {
	width: 100%;
	background: var(--rpr-primary);
	color: var(--rpr-btn-text);
	border: none;
	border-radius: var(--rpr-radius);
	padding: 12px 16px;
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
	font-family: inherit;
}

.rpr-submit-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.rpr-form-message {
	margin-bottom: 16px;
	padding: 12px 14px;
	border-radius: calc(var(--rpr-radius) / 2);
	font-size: 14px;
	font-family: inherit;
}

.rpr-form-message.rpr-success {
	background: #e7f7ec;
	color: #1e7e34;
	border: 1px solid #b6e6c4;
}

.rpr-form-message.rpr-error {
	background: #fdecea;
	color: #c0392b;
	border: 1px solid #f5c6c2;
}

/* --- User panel table --- */
.rpr-table-scroll { overflow-x: auto; }

.rpr-user-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
	font-family: inherit;
}

.rpr-user-table th,
.rpr-user-table td {
	padding: 10px 12px;
	text-align: right;
	border-bottom: 1px solid var(--rpr-border);
}

.rpr-user-table thead th {
	background: #faf9fc;
	font-weight: 700;
}

.rpr-login-notice,
.rpr-empty-notice {
	background: #f7f6fb;
	border: 1px dashed var(--rpr-border);
	border-radius: calc(var(--rpr-radius) / 2);
	padding: 16px;
	text-align: center;
	color: #666;
	font-family: inherit;
}

/* --- Status badges (shared) --- */
.rpr-badge {
	display: inline-block;
	padding: 4px 12px;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 700;
	white-space: nowrap;
}

.rpr-badge-pending {
	background: #fff3cd;
	color: #8a6d00;
}

.rpr-badge-reviewing {
	background: #d6e4ff;
	color: #1a4dab;
}

.rpr-badge-answered {
	background: #d7f5df;
	color: #1e7e34;
}

/* ==========================================================
   Admin dashboard - custom design (overrides default wp-admin look)
   ========================================================== */

.rpr-admin-wrap {
	direction: rtl;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Tahoma, Arial, sans-serif;
	max-width: 1180px;
	margin-top: 20px;
}

.rpr-admin-wrap * { box-sizing: border-box; }

.rpr-admin-wrap .dashicons {
	width: auto;
	height: auto;
	font-size: 30px;
	color: var(--rpr-primary);
}

/* --- Page header --- */
.rpr-page-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px;
	background: var(--rpr-primary);
	background: linear-gradient(135deg, var(--rpr-primary) 0%, #241454 100%);
	border-radius: 14px;
	padding: 22px 26px;
	margin-bottom: 22px;
}

.rpr-page-header-title {
	display: flex;
	align-items: center;
	gap: 14px;
}

.rpr-page-header-title .dashicons {
	background: rgba(255,255,255,0.18);
	color: #fff;
	border-radius: 12px;
	padding: 10px;
	font-size: 26px;
	width: 46px;
	height: 46px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.rpr-page-header h1 {
	margin: 0;
	padding: 0;
	font-size: 21px;
	font-weight: 800;
	color: #fff;
	line-height: 1.4;
}

.rpr-page-header p {
	margin: 4px 0 0;
	font-size: 13px;
	color: rgba(255,255,255,0.85);
}

.rpr-page-header .rpr-btn-outline {
	border-color: rgba(255,255,255,0.6);
	color: #fff;
}

.rpr-page-header .rpr-btn-outline:hover {
	background: rgba(255,255,255,0.12);
}

/* --- Stat cards --- */
.rpr-stat-cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 14px;
	margin-bottom: 22px;
}

.rpr-stat-card {
	display: flex;
	flex-direction: column;
	gap: 4px;
	background: #fff;
	border: 1px solid #ecebf2;
	border-radius: 12px;
	padding: 16px 18px;
	text-decoration: none;
	box-shadow: 0 1px 3px rgba(20,10,50,0.04);
	border-top: 3px solid #d8d4e6;
}

.rpr-stat-card:hover {
	border-color: var(--rpr-primary);
}

.rpr-stat-card.is-active {
	border-top-color: var(--rpr-primary);
	box-shadow: 0 4px 14px rgba(20,10,50,0.08);
}

.rpr-stat-number {
	font-size: 26px;
	font-weight: 800;
	color: var(--rpr-text);
}

.rpr-stat-label {
	font-size: 13px;
	color: #757087;
	font-weight: 600;
}

.rpr-stat-pending { border-top-color: #d9a900; }
.rpr-stat-reviewing { border-top-color: #2955c9; }
.rpr-stat-answered { border-top-color: #1e7e34; }

/* --- Cards --- */
.rpr-card {
	background: #fff;
	border: 1px solid #ecebf2;
	border-radius: 14px;
	padding: 22px 24px;
	margin-bottom: 20px;
	box-shadow: 0 1px 3px rgba(20,10,50,0.04);
}

.rpr-card-title {
	margin: 0 0 14px;
	padding: 0 0 12px;
	font-size: 16px;
	font-weight: 800;
	color: var(--rpr-text);
	border-bottom: 1px solid #f0eff5;
}

.rpr-card-desc {
	margin: -6px 0 16px;
	font-size: 13px;
	color: #757087;
}

/* --- Toolbar / search --- */
.rpr-card-toolbar {
	margin-bottom: 16px;
}

.rpr-search-form {
	display: flex;
	gap: 10px;
	max-width: 460px;
}

.rpr-search-input {
	position: relative;
	flex: 1;
	display: flex;
	align-items: center;
}

.rpr-search-input .dashicons {
	position: absolute;
	right: 10px;
	font-size: 16px;
	width: 16px;
	height: 16px;
	color: #a29cb5;
}

.rpr-search-input input[type="search"] {
	width: 100%;
	padding: 9px 34px 9px 12px;
	border: 1px solid #e2dff0;
	border-radius: 8px;
	font-family: inherit;
	font-size: 13px;
}

.rpr-search-input input[type="search"]:focus {
	outline: none;
	border-color: var(--rpr-primary);
}

/* --- Buttons (admin) --- */
.rpr-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 9px 18px;
	border-radius: 8px;
	font-size: 13px;
	font-weight: 700;
	font-family: inherit;
	cursor: pointer;
	text-decoration: none;
	border: 1px solid transparent;
	line-height: 1.4;
}

.rpr-btn-primary {
	background: var(--rpr-primary);
	color: #fff;
	border-color: var(--rpr-primary);
}

.rpr-btn-primary:hover {
	opacity: 0.92;
	color: #fff;
}

.rpr-btn-outline {
	background: #fff;
	color: var(--rpr-primary);
	border-color: #e2dff0;
}

.rpr-btn-outline:hover {
	border-color: var(--rpr-primary);
	color: var(--rpr-primary);
}

.rpr-btn-small {
	padding: 6px 12px;
	font-size: 12px;
}

/* --- Requests table --- */
.rpr-requests-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
}

.rpr-requests-table th {
	text-align: right;
	padding: 12px 14px;
	background: #f8f7fb;
	color: #6a637f;
	font-weight: 700;
	font-size: 12px;
	border-bottom: 1px solid #ecebf2;
}

.rpr-requests-table td {
	text-align: right;
	padding: 12px 14px;
	border-bottom: 1px solid #f2f1f6;
	color: var(--rpr-text);
}

.rpr-requests-table tbody tr:hover {
	background: #faf9fd;
}

.rpr-empty-row {
	text-align: center !important;
	color: #a29cb5;
	padding: 30px !important;
}

.rpr-pagination {
	margin-top: 16px;
	display: flex;
	justify-content: center;
	gap: 4px;
}

.rpr-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 32px;
	height: 32px;
	padding: 0 8px;
	border-radius: 6px;
	border: 1px solid #ecebf2;
	color: var(--rpr-text);
	text-decoration: none;
	font-size: 13px;
}

.rpr-pagination .page-numbers.current {
	background: var(--rpr-primary);
	border-color: var(--rpr-primary);
	color: #fff;
}

/* --- Notices --- */
.rpr-notice {
	padding: 12px 16px;
	border-radius: 10px;
	font-size: 13px;
	margin-bottom: 18px;
}

.rpr-notice-success {
	background: #e7f7ec;
	color: #1e7e34;
	border: 1px solid #b6e6c4;
}

/* --- Detail page --- */
.rpr-detail-grid {
	display: grid;
	grid-template-columns: 1.3fr 1fr;
	gap: 20px;
	align-items: start;
}

@media (max-width: 900px) {
	.rpr-detail-grid { grid-template-columns: 1fr; }
}

.rpr-detail-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.rpr-detail-list li {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 11px 0;
	border-bottom: 1px solid #f2f1f6;
	font-size: 13px;
}

.rpr-detail-list li:last-child { border-bottom: none; }

.rpr-detail-list li span {
	color: #837c98;
}

.rpr-detail-list li strong {
	color: var(--rpr-text);
	font-weight: 700;
}

.rpr-detail-field-label {
	display: block;
	font-size: 12px;
	font-weight: 700;
	color: #6a637f;
	margin: 14px 0 6px;
}

.rpr-detail-field-label:first-child { margin-top: 0; }

#rpr-status-box select,
#rpr-status-box textarea,
.rpr-input {
	width: 100%;
	padding: 9px 12px;
	border: 1px solid #e2dff0;
	border-radius: 8px;
	font-family: inherit;
	font-size: 13px;
	box-sizing: border-box;
	background: #fff;
	color: var(--rpr-text);
}

#rpr-status-box select:focus,
#rpr-status-box textarea:focus,
.rpr-input:focus {
	outline: none;
	border-color: var(--rpr-primary);
}

#rpr-status-box textarea {
	min-height: 100px;
	resize: vertical;
}

#rpr-status-box .rpr-btn {
	margin-top: 14px;
}

#rpr-status-result {
	display: inline-block;
	margin-right: 10px;
	font-size: 12px;
	font-weight: 700;
}

#rpr-status-result.rpr-ok { color: #1e7e34; }
#rpr-status-result.rpr-fail { color: #c0392b; }

/* --- Settings pages --- */
.rpr-textarea {
	width: 100%;
	padding: 12px;
	border: 1px solid #e2dff0;
	border-radius: 8px;
	font-family: inherit;
	font-size: 13px;
	line-height: 1.9;
}

.rpr-textarea:focus {
	outline: none;
	border-color: var(--rpr-primary);
}

.rpr-form-actions {
	margin-top: 18px;
	display: flex;
	justify-content: flex-start;
}

.rpr-settings-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 16px;
}

.rpr-settings-field label {
	display: block;
	font-size: 12px;
	font-weight: 700;
	color: #6a637f;
	margin-bottom: 6px;
}

.rpr-settings-field-wide {
	grid-column: 1 / -1;
}

.rpr-toggle-label {
	display: flex !important;
	align-items: center;
	gap: 8px;
	margin-top: 6px;
	font-size: 13px;
	font-weight: 600;
	color: var(--rpr-text);
}

.rpr-pattern-block {
	padding-top: 16px;
	margin-top: 16px;
	border-top: 1px dashed #ecebf2;
}

.rpr-pattern-block:first-of-type {
	padding-top: 0;
	margin-top: 0;
	border-top: none;
}

.rpr-pattern-block h3 {
	margin: 0 0 12px;
	font-size: 14px;
	font-weight: 700;
	color: var(--rpr-text);
}

.rpr-param-row {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.rpr-param-row select {
	flex: 1;
	min-width: 140px;
}

/* --- Shortcodes page --- */
.rpr-shortcode-list {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.rpr-shortcode-card {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 14px;
	margin-bottom: 0;
}

.rpr-shortcode-info h3 {
	margin: 0 0 4px;
	font-size: 14px;
	font-weight: 700;
	color: var(--rpr-text);
}

.rpr-shortcode-info p {
	margin: 0;
	font-size: 13px;
	color: #837c98;
	max-width: 480px;
}

.rpr-shortcode-box {
	display: flex;
	align-items: center;
	gap: 10px;
	background: #f8f7fb;
	border: 1px solid #ecebf2;
	border-radius: 10px;
	padding: 8px 8px 8px 14px;
}

.rpr-shortcode-code {
	font-family: Consolas, Menlo, monospace;
	font-size: 13px;
	color: var(--rpr-primary);
	background: transparent;
	white-space: nowrap;
}

/* --- Color picker sizing fix inside settings grid --- */
.rpr-settings-field .wp-picker-container {
	display: block;
}
