/* Recurify - My Account dashboard */

.woocommerce-MyAccount-content .rcfy-acc-title {
	margin-top: 0;
	font-size: 1.6rem;
}

.rcfy-acc-intro {
	color: #54595F;
	margin-bottom: 22px;
	font-size: 0.92rem;
}

/* Empty state */
.rcfy-acc-empty {
	background: #fdf0eb;
	border: 1px dashed #dc4614;
	border-radius: 12px;
	padding: 32px;
	text-align: center;
}
.rcfy-acc-empty .button {
	margin-top: 8px;
}

/* List */
.rcfy-acc-table {
	width: 100%;
	margin-bottom: 24px;
}
.rcfy-acc-table th,
.rcfy-acc-table td {
	vertical-align: middle;
	font-size: 0.93rem;
}
.rcfy-acc-table small {
	color: #888;
	font-weight: 400;
}
.rcfy-acc-view {
	background: #dc4614 !important;
	color: #fff !important;
	border-color: #dc4614 !important;
	font-size: 0.85rem !important;
}
.rcfy-acc-view:hover {
	background: #C04000 !important;
	border-color: #C04000 !important;
}

/* Status badges */
.rcfy-acc-status {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .4px;
	white-space: nowrap;
}
.rcfy-acc-status--active        { background: #d4edda; color: #155724; }
.rcfy-acc-status--paused        { background: #fff3cd; color: #856404; }
.rcfy-acc-status--on-hold       { background: #ffeeba; color: #856404; }
.rcfy-acc-status--pending-payment { background: #d1ecf1; color: #0c5460; }
.rcfy-acc-status--cancelled     { background: #f8d7da; color: #721c24; }
.rcfy-acc-status--expired       { background: #e2e3e5; color: #383d41; }

/* Detail */
.rcfy-acc-back {
	display: inline-block;
	margin-bottom: 14px;
	font-size: 0.85rem;
	text-decoration: none;
	color: #dc4614;
}
.rcfy-acc-detail-header {
	display: flex;
	align-items: center;
	gap: 14px;
	flex-wrap: wrap;
	margin-bottom: 18px;
}
.rcfy-acc-detail-header h2 {
	margin: 0;
	font-size: 1.5rem;
}

.rcfy-acc-summary {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 14px;
	margin-bottom: 26px;
}
.rcfy-acc-summary > div {
	background: #f8f9fa;
	border-radius: 10px;
	padding: 14px 16px;
}
.rcfy-acc-label {
	display: block;
	font-size: 0.75rem;
	color: #7A7A7A;
	text-transform: uppercase;
	letter-spacing: .3px;
	margin-bottom: 4px;
}
.rcfy-acc-summary strong {
	font-size: 1.05rem;
	color: #2b2b2b;
}

/* Actions */
.rcfy-acc-actions {
	background: #fff;
	border: 1px solid #eee;
	border-radius: 12px;
	padding: 16px 18px;
	margin-bottom: 26px;
}
.rcfy-acc-actions h3 {
	margin-top: 0;
	margin-bottom: 12px;
	font-size: 1rem;
}
.rcfy-acc-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}
.rcfy-acc-buttons form {
	margin: 0;
}
.rcfy-acc-btn-primary {
	background: #dc4614 !important;
	color: #fff !important;
	border-color: #dc4614 !important;
}
.rcfy-acc-btn-primary:hover {
	background: #C04000 !important;
}
.rcfy-acc-btn-danger {
	background: #fff !important;
	color: #a00 !important;
	border: 1px solid #a00 !important;
}
.rcfy-acc-btn-danger:hover {
	background: #fff5f5 !important;
}

/* Item forms */
.rcfy-acc-item-form {
	display: flex;
	gap: 6px;
	align-items: stretch;
	margin: 0;
}
.rcfy-acc-item-form select,
.rcfy-acc-item-form input[type="date"] {
	font-size: 0.85rem;
	padding: 0 28px 0 10px;
	height: 40px;
	line-height: normal;
	box-sizing: border-box;
}
.rcfy-acc-item-form input[type="date"] {
	padding: 0 10px;
}
.rcfy-acc-item-form select {
	min-width: 150px;
	width: auto;
}
.rcfy-acc-item-form button {
	height: 40px;
	display: inline-flex;
	align-items: center;
	box-sizing: border-box;
}

.rcfy-acc-items,
.rcfy-acc-orders {
	margin-bottom: 24px;
}

@media (max-width: 600px) {
	.rcfy-acc-buttons { flex-direction: column; align-items: stretch; }
	.rcfy-acc-buttons form button { width: 100%; }
	.rcfy-acc-item-form { flex-wrap: wrap; }
}

/* Payment method section */
.rcfy-acc-pmethod {
	background: #fff;
	border: 1px solid #eee;
	border-radius: 12px;
	padding: 18px;
	margin-bottom: 26px;
}
.rcfy-acc-pmethod-current {
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin-bottom: 18px;
	padding-bottom: 16px;
	border-bottom: 1px dashed #eee;
}
.rcfy-acc-pmethod-current > strong {
	font-size: 1rem;
	color: #2b2b2b;
	letter-spacing: 0.3px;
	line-height: 1.4;
}
.rcfy-acc-pmethod-backup {
	margin-top: 10px;
	padding-top: 10px;
	border-top: 1px dashed #f0f0f0;
}
.rcfy-acc-pmethod-backup strong {
	font-size: 0.95rem;
	color: #2b2b2b;
}
.rcfy-acc-pmethod-form {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
	align-items: end;
}
.rcfy-acc-pmethod-form label {
	display: flex;
	flex-direction: column;
	gap: 6px;
}
.rcfy-acc-pmethod-form label span {
	font-size: 15px;
	color: #2b2b2b;
	font-weight: 700;
}
.rcfy-acc-pmethod-form select {
	padding: 8px 10px;
	border: 1px solid #ccc;
	border-radius: 6px;
	font-size: 0.92rem;
	background: #fff;
}
.rcfy-acc-pmethod-actions {
	grid-column: 1 / -1;
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}
.rcfy-acc-pmethod-empty {
	display: flex;
	align-items: center;
	gap: 14px;
	flex-wrap: wrap;
	color: #54595F;
}
@media (max-width: 600px) {
	.rcfy-acc-pmethod-form { grid-template-columns: 1fr; }
}

/* Modal: Add new card */
.rcfy-modal {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 999999;
	align-items: flex-start;
	justify-content: center;
	padding: 40px 16px;
	overflow-y: auto;
}
.rcfy-modal.is-open { display: flex; }
.rcfy-modal__backdrop {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, .55);
	backdrop-filter: blur(2px);
}
.rcfy-modal__dialog {
	position: relative;
	background: #fff;
	border-radius: 14px;
	max-width: 720px;
	width: 100%;
	box-shadow: 0 24px 60px rgba(0, 0, 0, .25);
	margin: auto;
}
.rcfy-modal__close {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 38px !important;
	min-width: 38px !important;
	max-width: 38px !important;
	height: 38px !important;
	min-height: 38px !important;
	padding: 0 !important;
	margin: 0 !important;
	background: #f0f0f0 !important;
	border: 1px solid #e0e0e0 !important;
	border-radius: 50% !important;
	font-size: 22px !important;
	line-height: 1 !important;
	cursor: pointer;
	color: #54595F !important;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	box-shadow: none !important;
	transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.rcfy-modal__close:hover,
.rcfy-modal__close:focus {
	background: #dc4614 !important;
	border-color: #dc4614 !important;
	color: #fff !important;
}
.rcfy-modal__body {
	padding: 28px 28px 24px;
}
.rcfy-modal__body .xtpm-add-method {
	margin: 0;
	padding: 0;
}
@media (max-width: 600px) {
	.rcfy-modal { padding: 16px 8px; }
	.rcfy-modal__body { padding: 20px 16px 16px; }
}

/* Pay now banner */
.rcfy-acc-paynow {
	display: flex;
	align-items: center;
	gap: 16px;
	background: linear-gradient(135deg, #fff5ef 0%, #fdf0eb 100%);
	border: 1.5px solid #dc4614;
	border-radius: 14px;
	padding: 18px 22px;
	margin: 0 0 24px;
	box-shadow: 0 4px 14px rgba(220, 70, 20, 0.08);
}
.rcfy-acc-paynow__icon {
	flex-shrink: 0;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: #dc4614;
	color: #fff;
	font-weight: 800;
	font-size: 20px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.rcfy-acc-paynow__body {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 2px;
}
.rcfy-acc-paynow__body strong {
	font-size: 1rem;
	color: #2b2b2b;
}
.rcfy-acc-paynow__body span {
	font-size: 0.85rem;
	color: #54595F;
}
.rcfy-acc-paynow__btn {
	white-space: nowrap;
	padding: 10px 22px !important;
	font-size: 0.95rem !important;
}
@media (max-width: 600px) {
	.rcfy-acc-paynow { flex-direction: column; text-align: center; align-items: stretch; }
	.rcfy-acc-paynow__icon { margin: 0 auto; }
	.rcfy-acc-paynow__btn { width: 100%; }
}

/* Cancel button disabled (no cumple mínimo de pagos) */
.rcfy-acc-btn-disabled,
.rcfy-acc-btn-disabled:hover {
	background: #f4f4f4 !important;
	color: #b0b0b0 !important;
	border: 1px solid #d8d8d8 !important;
	cursor: not-allowed !important;
	box-shadow: none !important;
}

/* Payment method section — extended */
.rcfy-acc-pmethod-hint {
	margin: 6px 0 0;
	font-size: 0.8rem;
	color: #333333;
	line-height: 1.4;
}
.rcfy-acc-pmethod-hint--warn {
	color: #b06000;
	font-style: normal;
	font-weight: 500;
}
.rcfy-acc-pmethod-full {
	grid-column: 1 / -1;
}

/* Saved cards list */
.rcfy-acc-cards-list {
	margin-top: 22px;
	padding-top: 18px;
	border-top: 1px dashed #eee;
}
.rcfy-acc-cards-list h4 {
	margin: 0 0 6px;
	font-size: 0.95rem;
	color: #2b2b2b;
}
.rcfy-acc-cards {
	list-style: none;
	margin: 12px 0 0;
	padding: 0;
}
.rcfy-acc-card-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	padding: 10px 14px;
	background: #f8f9fa;
	border-radius: 8px;
	margin-bottom: 6px;
	flex-wrap: wrap;
}
.rcfy-acc-card-info {
	font-size: 0.9rem;
	color: #2b2b2b;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}
.rcfy-acc-card-role {
	background: #dc4614;
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	padding: 2px 8px;
	border-radius: 999px;
	text-transform: uppercase;
	letter-spacing: .4px;
}
.rcfy-acc-card-form {
	margin: 0;
}
.rcfy-acc-btn-link-danger {
	background: transparent !important;
	color: #a00 !important;
	border: 1px solid #a00 !important;
	font-size: 0.8rem !important;
}
.rcfy-acc-btn-link-danger:hover {
	background: #fff5f5 !important;
}

/* Empty state cuando es Azul sin tarjetas */
.rcfy-acc-pmethod-empty-card {
	margin-top: 18px;
	padding: 18px;
	background: #fdf0eb;
	border: 1px dashed #dc4614;
	border-radius: 10px;
	text-align: center;
}
.rcfy-acc-pmethod-empty-card p {
	margin: 0 0 12px;
	color: #54595F;
	font-size: 0.9rem;
}

/* Header de lista de tarjetas con botón inline */
.rcfy-acc-cards-list__header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	margin-bottom: 4px;
}
.rcfy-acc-cards-list__header h4 {
	margin: 0;
}

/* Padding de celdas en las tablas de Recurify (scopeado, no afecta otras shop_table del sitio) */
.rcfy-acc-items.shop_table > tbody > tr > td,
.rcfy-acc-items.shop_table > thead > tr > th,
.rcfy-acc-orders.shop_table > tbody > tr > td,
.rcfy-acc-orders.shop_table > thead > tr > th,
.rcfy-acc-table.shop_table > tbody > tr > td,
.rcfy-acc-table.shop_table > thead > tr > th {
	padding: 6px 16px;
}

/* Centrar la columna Cantidad en las tablas de Recurify */
.rcfy-acc-items td[data-title="Cantidad"],
.rcfy-acc-items th:nth-child(2) {
	text-align: center;
}

/* Enlace "Ver pedido" en el historial de pedidos */
.rcfy-acc-order-link {
	color: #dc4614 !important;
	text-decoration: none !important;
	font-size: 0.88rem;
	white-space: nowrap;
	background: transparent !important;
	border: 0 !important;
	padding: 0 !important;
}
.rcfy-acc-order-link:hover,
.rcfy-acc-order-link:focus {
	color: #C04000 !important;
	text-decoration: underline !important;
}

/* Botón morado (igual a los botones Guardar del tema) */
.rcfy-acc-btn-purple {
	background: #4739a0 !important;
	color: #fff !important;
	border-color: #4739a0 !important;
}
.rcfy-acc-btn-purple:hover,
.rcfy-acc-btn-purple:focus {
	background: #392e82 !important;
	border-color: #392e82 !important;
	color: #fff !important;
}

/* Badge "Actual" para el método de pago activo */
.rcfy-acc-badge {
	display: inline-block;
	align-self: flex-start;
	width: auto;
	max-width: max-content;
	padding: 3px 10px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .4px;
	white-space: nowrap;
	margin-bottom: 6px;
}
.rcfy-acc-badge--current {
	background: #d4edda;
	color: #155724;
}

/* Coupon section */
.rcfy-acc-coupon {
	background: #fff;
	border: 1px solid #eee;
	border-radius: 12px;
	padding: 20px;
	margin-bottom: 26px;
}
.rcfy-acc-coupon--active {
	background: linear-gradient(135deg, #f3f6ff 0%, #eef2ff 100%);
	border-color: #4739a0;
}

/* Estado vacío (sin cupón) */
.rcfy-acc-coupon-intro {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 14px;
	font-size: 0.92rem;
	color: #54595F;
	line-height: 1.4;
}
.rcfy-acc-coupon-intro-icon {
	flex-shrink: 0;
	width: 30px;
	height: 30px;
	border-radius: 8px;
	background: #eef2ff;
	color: #4739a0;
	font-weight: 800;
	font-size: 16px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.rcfy-acc-coupon-form {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	align-items: stretch;
}
.rcfy-acc-coupon-input {
	flex: 1;
	min-width: 200px;
	padding: 0 14px;
	height: 46px;
	border: 1.5px solid #d4d4d4;
	border-radius: 10px;
	font-size: 0.95rem;
	font-weight: 600;
	letter-spacing: 1px;
	text-transform: uppercase;
	transition: border-color .15s ease;
}
.rcfy-acc-coupon-input:focus {
	border-color: #4739a0;
	outline: none;
}
.rcfy-acc-coupon-form .button {
	height: 46px;
	display: inline-flex;
	align-items: center;
	padding: 0 22px !important;
	font-weight: 700;
}

/* Estado activo (cupón aplicado) */
.rcfy-acc-coupon-applied {
	display: flex;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
}
.rcfy-acc-coupon-ticket {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: #4739a0;
	color: #fff;
	border-radius: 10px;
	padding: 10px 16px;
	box-shadow: 0 4px 12px rgba(71, 57, 160, 0.25);
}
.rcfy-acc-coupon-ticket::before,
.rcfy-acc-coupon-ticket::after {
	content: '';
	position: absolute;
	top: 50%;
	width: 12px;
	height: 12px;
	background: #eef2ff;
	border-radius: 50%;
	transform: translateY(-50%);
}
.rcfy-acc-coupon-ticket::before { left: -6px; }
.rcfy-acc-coupon-ticket::after { right: -6px; }
.rcfy-acc-coupon-ticket-icon {
	font-weight: 800;
	font-size: 16px;
	opacity: .85;
}
.rcfy-acc-coupon-ticket-code {
	font-weight: 800;
	letter-spacing: 1.5px;
	font-size: 1rem;
}
.rcfy-acc-coupon-applied-text {
	display: flex;
	flex-direction: column;
	gap: 2px;
	flex: 1;
	min-width: 180px;
}
.rcfy-acc-coupon-applied-title {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-weight: 700;
	color: #2b2b2b;
	font-size: 0.95rem;
}
.rcfy-acc-coupon-check {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #2e9b47;
	color: #fff;
	font-size: 11px;
	font-weight: 900;
}
.rcfy-acc-coupon-applied-sub {
	font-size: 0.83rem;
	color: #54595F;
}
.rcfy-acc-coupon-remove-form {
	margin: 0;
}
.rcfy-acc-coupon-remove {
	background: transparent !important;
	border: 0 !important;
	color: #a00 !important;
	cursor: pointer;
	font-size: 0.85rem !important;
	font-weight: 600;
	text-decoration: underline !important;
	padding: 6px 10px !important;
	box-shadow: none !important;
	width: auto !important;
	height: auto !important;
}
.rcfy-acc-coupon-remove:hover { color: #c00 !important; }

@media (max-width: 600px) {
	.rcfy-acc-coupon-applied { flex-direction: column; align-items: stretch; }
	.rcfy-acc-coupon-ticket { align-self: flex-start; }
}
