/*
 * File name : serviceRates.css
 * Author    : mayuri@rtac.in
 * DOC       : 04-Nov-2026
 * Use       : Styles for Admin -> Service Rates (A5).
 *             Every class is prefixed "dcR" so nothing collides with main.css.
 *             Same look as manageCustomer.css; service rows as addCustomer.css.
 */

/* ============================================================
   Colour tokens, scoped to the page.
   ============================================================ */
#sectionServiceRates {
    --dcr-orange       : #F4623A;
    --dcr-orange-soft  : #FDEFEA;
    --dcr-orange-dark  : #E04E28;
    --dcr-bg           : #F7F8FB;
    --dcr-card         : #FFFFFF;
    --dcr-border       : #EAEDF3;
    --dcr-text         : #1F2937;
    --dcr-text-muted   : #6B7280;
    --dcr-text-soft    : #9CA3AF;

    background: var(--dcr-bg);
    min-height: calc(100vh - 64px);
    padding: 28px 32px 40px;
}

/* ============================================================
   Header row.
   ============================================================ */
.dcRHeader {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.dcRTitleWrap { display: flex; align-items: center; gap: 14px; }

.dcRTitleBadge {
    width: 46px; height: 46px;
    border-radius: 13px;
    background: linear-gradient(135deg, #F4623A 0%, #FF8A65 100%);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
    box-shadow: 0 6px 18px rgba(244, 98, 58, 0.30);
}

.dcRTitle {
    font-size: 22px;
    font-weight: 700;
    color: var(--dcr-text);
    margin: 0;
    line-height: 1.1;
}
.dcRSubtitle {
    font-size: 13px;
    color: var(--dcr-text-muted);
    margin: 3px 0 0;
}

/* ============================================================
   Panel + buttons.
   ============================================================ */
.dcRPanel {
    background: var(--dcr-card);
    border: 1px solid var(--dcr-border);
    border-radius: 14px;
    overflow: hidden;
    padding: 16px 0;
}

.dcRBtn {
    padding: 9px 16px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    line-height: 1;
    cursor: pointer;
    transition: background .15s, box-shadow .15s, transform .1s;
    border: 1px solid transparent;
}
.dcRBtn:active { transform: translateY(1px); }
.dcRBtn:disabled { opacity: .65; cursor: default; }

.dcRBtnOutline {
    background: var(--dcr-card);
    color: var(--dcr-text);
    border-color: var(--dcr-border);
}
.dcRBtnOutline:hover { background: var(--dcr-bg); color: var(--dcr-text); }

.dcRBtnPrimary {
    background: var(--dcr-orange);
    color: #fff;
    box-shadow: 0 4px 12px rgba(244, 98, 58, 0.28);
}
.dcRBtnPrimary:hover { background: var(--dcr-orange-dark); color: #fff; }

/* ============================================================
   Customer grid.
   ============================================================ */
.dcRTable thead th {
    background: #FAFBFC;
    border-bottom: 1px solid var(--dcr-border);
    font-size: 11px;
    font-weight: 700;
    color: var(--dcr-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 12px 16px;
    white-space: nowrap;
}

.dcRTable tbody td {
    padding: 14px 16px;
    border-top: 1px solid var(--dcr-border);
    vertical-align: middle;
    font-size: 14px;
    color: var(--dcr-text);
}

/* DataTables search box (top-left). Change width here. */
#sectionServiceRates .dt-search {
    padding: 0 16px 12px;
}
#sectionServiceRates .dt-search input {
    width: 320px;
    max-width: 100%;
    margin-left: 0;
    border: 1px solid var(--dcr-border);
    border-radius: 10px;
    padding: 9px 14px;
    font-size: 14px;
    outline: none;
}
#sectionServiceRates .dt-search input:focus {
    border-color: var(--dcr-orange);
    box-shadow: 0 0 0 3px rgba(244, 98, 58, 0.12);
}

.dcRName    { font-weight: 600; }
.dcRCompany { font-size: 12px; color: var(--dcr-text-muted); }
.dcRMuted   { color: var(--dcr-text-soft); font-size: 13px; }

/* Status badges */
.dcRBadge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}
.dcRBadgeActive    { background: #DCFCE7; color: #15803D; }
.dcRBadgeSuspended { background: #FEF3C7; color: #B45309; }

/* Service chips in the grid: "SMS ₹10.0000" (on) / "RCS Off" (off) */
.dcRChips { display: flex; flex-wrap: wrap; gap: 6px; }
.dcRChip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}
.dcRChipOn  { background: var(--dcr-orange-soft); color: var(--dcr-orange-dark); }
.dcRChipOff { background: #F3F4F6; color: #6B7280; }
.dcRChipRate { font-family: Consolas, monospace; font-weight: 400; }

/* ============================================================
   Modal: title icon, section title, hint.
   ============================================================ */
.dcRModalIcon {
    width: 32px; height: 32px;
    border-radius: 8px;
    background: var(--dcr-orange-soft);
    color: var(--dcr-orange);
    display: inline-flex;
    align-items: center; justify-content: center;
    font-size: 16px;
}

.dcRSectionTitle {
    font-size: 13px;
    font-weight: 700;
    color: var(--dcr-text);
    padding-bottom: 8px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--dcr-border);
}

.dcRHint {
    display: block;
    font-size: 12px;
    color: var(--dcr-text-muted);
}

/* ============================================================
   Services + rates list (same as Add Customer's).
   ============================================================ */
.dcRServices {
    border: 1px solid var(--dcr-border);
    border-radius: 12px;
    overflow: hidden;
}

.dcRServiceRow {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-top: 1px solid var(--dcr-border);
}
.dcRServiceRow:first-child { border-top: none; }
.dcRServices > .dcRMuted { padding: 12px 16px; }

.dcRServiceInfo { flex: 1; min-width: 0; cursor: pointer; }
.dcRServiceName { font-weight: 600; color: var(--dcr-text); }
.dcRServiceDesc { font-size: 12px; color: var(--dcr-text-muted); }

/* Enabled switch: orange when on */
.dcRServiceRow .form-switch .form-check-input {
    width: 40px;
    height: 20px;
    cursor: pointer;
}
.dcRServiceRow .form-switch .form-check-input:checked {
    background-color: var(--dcr-orange);
    border-color: var(--dcr-orange);
}
.dcRServiceRow .form-switch .form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(244, 98, 58, 0.12);
}

/* ₹ + rate box */
.dcRServiceRate { width: 150px; flex-shrink: 0; }
.dcRServiceRate .input-group-text {
    border: 1px solid var(--dcr-border);
    border-radius: 10px 0 0 10px;
    background: var(--dcr-bg);
    color: var(--dcr-text-muted);
}

.dcRInput {
    border: 1px solid var(--dcr-border) !important;
    border-radius: 0 10px 10px 0 !important;
    padding: 10px 14px !important;
    font-size: 14px !important;
    background: #fff;
    transition: border .15s, box-shadow .15s;
    box-shadow: none !important;
}
.dcRInput:focus {
    outline: none !important;
    border-color: var(--dcr-orange) !important;
    box-shadow: 0 0 0 3px rgba(244, 98, 58, 0.12) !important;
}
.dcRInput:disabled {
    background: var(--dcr-bg);
    color: var(--dcr-text-soft);
}

/* ============================================================
   Modal - same look as the Manage Customers modals.
   Add the next modal's id to each rule.
   ============================================================ */
#modalServiceRates .modal-content {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(17, 24, 39, 0.18);
}
#modalServiceRates .modal-header {
    background: #fff;
    border-bottom: 1px solid var(--dcr-border);
    padding: 18px 24px;
}
#modalServiceRates .modal-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--dcr-text);
    display: flex;
    align-items: center;
    gap: 10px;
}
#modalServiceRates .modal-body {
    padding: 22px 24px;
    font-size: 14px;
    color: var(--dcr-text);
}
#modalServiceRates .modal-footer {
    background: #FAFBFC;
    border-top: 1px solid var(--dcr-border);
    padding: 14px 24px;
}

/* ============================================================
   Responsive.
   ============================================================ */
@media (max-width: 640px) {
    #sectionServiceRates { padding: 20px 16px 32px; }
    .dcRServiceRow { flex-wrap: wrap; }
    .dcRServiceRate { width: 100%; }
}
