/**
 * NFA Pricing Rules — Styles
 * File: assets/css/nfa-pricing-rules.css
 *
 * Covers:
 *  .fd-pr-wrap      — container holding list + add button
 *  .fd-pr-list      — scrollable rule list
 *  .fd-pr-row       — single rule row
 *  .fd-pr-modal-*   — modal overlay + dialog
 *  .fd-pr-msg--*    — inline messages
 */

/* ═══════════════════════════════════════════════
   WRAP + LIST
═══════════════════════════════════════════════ */

.fd-pr-wrap {
    margin-top: 16px;
}

.fd-pr-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
    min-height: 32px;
}

.fd-pr-empty-hint {
    font-size: 13px;
    color: #aaa;
    margin: 0;
    padding: 10px 0;
}

.fd-pr-empty-hint--error {
    color: #dc2626;
}

/* ═══════════════════════════════════════════════
   RULE ROW
═══════════════════════════════════════════════ */

.fd-pr-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    transition: border-color 0.15s, box-shadow 0.15s;
	border-left:5px solid #2563eb;
    box-shadow:0 2px 8px rgba(37,99,235,.08);
}

.fd-pr-row:hover {
    border-color: #d1d5db;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.fd-pr-row__info {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 10px;
    flex: 1;
    min-width: 0;
}

.fd-pr-row__range {
    font-size: var(--fs-15);
    padding: 3px 10px;
    white-space: nowrap;
    letter-spacing: 0.01em;
    order: -1;
}

.fd-pr-row__type {
    font-size: var(--fs-14);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #1e3a8a;
    white-space: nowrap;
}

.fd-pr-row__summary {
    font-size: var(--fs-16);
    font-weight: 700;
    color: #2563eb;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fd-pr-row__meta {
    font-size: var(--fs-14);
    color: #64748b;
    white-space: nowrap;
}

.fd-pr-row__actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.fd-pr-edit-btn,
.fd-pr-delete-btn {
    all: unset;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: var(--fs-14);
    font-weight: 600;
    border-radius: 5px;
    padding: 4px 10px;
    transition: background 0.15s, color 0.15s;
    line-height: 1;
}

.fd-pr-edit-btn {
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
}

.fd-pr-edit-btn:hover {
    background: #dbeafe;
    border-color: #93c5fd;
}

.fd-pr-delete-btn {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
    font-size: 14px;
    padding: 4px 8px;
}

.fd-pr-delete-btn:hover {
    background: #fee2e2;
    border-color: #fca5a5;
}

/* ═══════════════════════════════════════════════
   ADD BUTTON
═══════════════════════════════════════════════ */

.fd-pr-add-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: var(--fs-14);
    font-weight: 600;
    color: #2563eb;
    background: #eff6ff;
    border: 1px dashed #93c5fd;
    border-radius: 7px;
    padding: 13px 16px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    margin-top: 4px;
}

.fd-pr-add-btn:hover:not(:disabled) {
    background: #dbeafe;
    border-color: #60a5fa;
}


/* ═══════════════════════════════════════════════
   MODAL OVERLAY
═══════════════════════════════════════════════ */

.fd-pr-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
	z-index:9999;
    overflow-y: auto;
}

body.fd-pr-modal-open {
    overflow: hidden;
}

/* ═══════════════════════════════════════════════
   MODAL DIALOG
═══════════════════════════════════════════════ */

.fd-pr-modal {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 700px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    padding: 28px 28px 24px;
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
}
.fd-pr-type-fields {
	margin-top:32px;
}

.fd-pr-modal__header {
	flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 14px;
    border-bottom: 1px solid #f3f4f6;
}
/* Body */
.fd-pr-modal__body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}
/* Footer */
.fd-pf-actions {
    flex-shrink: 0;
	padding:20px 0;
/*     padding: 20px; */
    border-top: 1px solid #eee;
    background: #fff;
}

.fd-pr-modal__header h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: #111827;
}

.fd-pr-modal__close {
    all: unset;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 16px;
    color: #6b7280;
    background: transparent;
    transition: background 0.15s, color 0.15s;
    flex-shrink: 0;
}

.fd-pr-modal__close:hover {
    background: #f3f4f6;
    color: #111827;
}

.fd-pr-modal .fd-pf-row {
	grid-template-columns: 1fr;
}


/* ═══════════════════════════════════════════════
   MODAL MESSAGE
═══════════════════════════════════════════════ */

.fd-pr-modal__msg {
    font-size: 13px;
    font-weight: 500;
    border-radius: 6px;
    padding: 10px 14px;
    margin: 0;
}

.fd-pr-msg--error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
	margin-top:15px;
}

.fd-pr-msg--success {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

/* ═══════════════════════════════════════════════
   TYPE-SPECIFIC FIELD GROUPS
═══════════════════════════════════════════════ */

.fd-pr-type-fields {
    padding: 14px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

/* ═══════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════ */

@media (max-width: 600px) {
    .fd-pr-modal {
        padding: 20px 16px 18px;
        gap: 14px;
    }

    .fd-pr-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

/*     .fd-pr-row__actions {
        align-self: flex-end;
    } */

    .fd-pr-add-btn {
        width: 100%;
        justify-content: center;
    }
}

@media only screen and (max-width:1366px){
	.fd-pr-type-fields {
	margin-top:28px;
}
}
@media only screen and (max-width:1199px){
	.fd-pr-type-fields {
	margin-top:26px;
}
}
@media only screen and (max-width:1024px){
	.fd-pr-type-fields {
	margin-top:24px;
}
}
@media only screen and (max-width:767px){
	.fd-pr-type-fields {
	margin-top:20px;
}
}
@media only screen and (max-width:500px){
	.fd-pr-row__type, .fd-pr-row__meta {
    flex: 0 0 100%;
}
.fd-pr-row__sweet-badge, .fd-pr-row__summary {
    display: inline-flex;
    align-items: center;
}
.fd-pr-row__sweet-badge{
	margin-left:0 !important;
}
	.fd-pr-row__info{
		justify-content:space-between;
		align-items:center;
	}
}