/* ==========================================================================
   Hajipur Marketing User PMR Details Page Styles (hmd-*)
   ========================================================================== */

.hmd-container {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #333333;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 100px);
    box-sizing: border-box;
}

/* Card Container */
.hmd-card {
    background-color: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    box-shadow: 0 1px 3px 0 rgba(15, 23, 42, 0.04), 0 1px 2px -1px rgba(15, 23, 42, 0.03);
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

/* Scrollable Card Body */
.hmd-card-body {
    flex: 1;
    overflow-y: auto;
    padding: 22px;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.hmd-section-spacer {
    height: 26px;
    width: 100%;
}

.hmd-section-divider {
    height: 1px;
    background-color: #E1E5EA;
    margin: 24px 0;
    width: 100%;
}

.hmd-timeline-box {
    border: 1px solid rgba(225, 229, 234, 0.9);
    border-radius: 12px;
    padding: 18px 24px 22px 24px;
    background: linear-gradient(180deg, #FFFFFF 0%, #FAFAFA 100%);
    box-shadow: 0 2px 8px -2px rgba(15, 23, 42, 0.04);
    box-sizing: border-box;
    margin-top: 28px;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.hmd-timeline-box:hover {
    border-color: rgba(203, 213, 225, 0.95);
    box-shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.06);
}

.hmd-section-block {
    display: flex;
    flex-direction: column;
}

/* Header Row */
.hmd-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    width: fit-content;
}

.hmd-card-header .status-badge {
    margin: 0 !important;
}

.hmd-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #151515;
}

/* Top 2-Column Grid (~52% Left, ~48% Right) with Vertical Divider */
.hmd-top-grid {
    display: grid;
    grid-template-columns: 1fr auto 440px;
    gap: 24px;
    align-items: stretch;
}

/* Vertical Grey Divider */
.hmd-vertical-divider {
    width: 1px;
    background-color: #E1E5EA;
    align-self: stretch;
}

/* Left PMR Information Specs (2 cols x 4 rows) */
.hmd-left-specs {
    display: flex;
    flex-direction: column;
}

.hmd-specs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    column-gap: 28px;
    row-gap: 14px;
}

.hmd-spec-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    border-bottom: 1px solid #F0F0F5;
    padding-bottom: 10px;
}

.hmd-spec-label {
    font-size: 11.5px;
    font-weight: 600;
    color: #151515;
}

.hmd-spec-value {
    font-size: 13px;
    color: #808080;
    font-weight: 400;
}

/* Right Send Negotiation Request Card */
.hmd-right-neg-card {
    background-color: #F2F2F2 !important;
    border-radius: 8px;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-sizing: border-box;
}

.hmd-neg-title {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: #151515;
}

.hmd-neg-subtitle {
    margin: -6px 0 2px 0;
    font-size: 11.5px;
    color: #808080;
    line-height: 1.4;
}

/* Total Cost Summary Box */
.hmd-cost-banner {
    background-color: #FFFFFF;
    border: 1px solid #EAEAEF;
    border-radius: 6px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hmd-cost-left,
.hmd-cost-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

.hmd-cost-label,
.hmd-diff-label {
    font-size: 11px;
    color: #808080;
}

.hmd-cost-val {
    font-size: 13.5px;
    font-weight: 700;
    color: #151515;
}

.hmd-diff-val {
    font-size: 13.5px;
    font-weight: 700;
    color: #DC2626;
}

.hmd-saved-tag {
    font-size: 11px;
    font-weight: 400;
    color: #0405AB;
}

.hmd-cost-divider {
    width: 1px;
    height: 22px;
    background-color: #EAEAEF;
    margin: 0 10px;
}

/* Form Controls */
.hmd-form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hmd-form-label {
    font-size: 12px;
    font-weight: 600;
    color: #151515;
}

.hmd-form-input {
    width: 100%;
    height: 38px;
    padding: 0 12px;
    font-size: 12.5px;
    color: #333333;
    background-color: #FFFFFF;
    border: 1px solid #E1E5EA;
    border-radius: 6px;
    box-sizing: border-box;
}

.hmd-form-textarea {
    width: 100%;
    height: 60px;
    padding: 8px 12px;
    font-size: 12.5px;
    color: #333333;
    background-color: #FFFFFF;
    border: 1px solid #E1E5EA;
    border-radius: 6px;
    box-sizing: border-box;
    resize: none;
}

.hmd-form-input:focus,
.hmd-form-textarea:focus {
    outline: none;
    border-color: #9CA3AF;
    box-shadow: 0 0 0 2px rgba(108, 117, 125, 0.2);
}

/* Section Titles */
.hmd-section-title {
    margin: 0 0 14px 0;
    font-size: 15px;
    font-weight: 700;
    color: #151515;
}

/* Stepper Timeline Animations & Interactivity */
@keyframes hmdStepperPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(18, 183, 106, 0.45);
    }
    70% {
        box-shadow: 0 0 0 7px rgba(18, 183, 106, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(18, 183, 106, 0);
    }
}

@keyframes hmdLineShimmer {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Stepper Timeline */
.hmd-stepper-wrapper {
    padding: 14px 10px 6px 10px;
}

.hmd-stepper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.hmd-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 2;
    cursor: pointer;
    user-select: none;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hmd-step:hover {
    transform: translateY(-2px);
}

.hmd-step:active {
    transform: translateY(0) scale(0.96);
}

.hmd-step-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #888888;
    color: #FFFFFF;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hmd-step.completed .hmd-step-icon {
    background: linear-gradient(135deg, #12B76A 0%, #059669 100%);
    animation: hmdStepperPulse 2.5s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
}

.hmd-step:hover.completed .hmd-step-icon {
    transform: scale(1.14);
    box-shadow: 0 0 0 5px rgba(18, 183, 106, 0.22), 0 4px 12px rgba(5, 150, 105, 0.4);
}

.hmd-step.pending .hmd-step-icon {
    background: linear-gradient(135deg, #98A2B3 0%, #667085 100%);
}

.hmd-step:hover.pending .hmd-step-icon {
    transform: scale(1.12);
    background: linear-gradient(135deg, #667085 0%, #475467 100%);
    box-shadow: 0 0 0 4px rgba(152, 162, 179, 0.22);
}

.hmd-step-icon svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.5;
    transition: transform 0.25s ease;
}

.hmd-step:hover .hmd-step-icon svg {
    transform: scale(1.12);
}

.hmd-step-label {
    font-size: 11.5px;
    font-weight: 600;
    color: #64748B;
    white-space: nowrap;
    transition: color 0.2s ease, transform 0.2s ease;
}

.hmd-step.completed .hmd-step-label {
    color: #0F172A;
    font-weight: 700;
}

.hmd-step:hover .hmd-step-label {
    color: #0405AB;
    transform: translateY(-1px);
}

.hmd-step-line {
    flex: 1;
    height: 3px;
    background-color: #E2E8F0;
    border-radius: 999px;
    position: relative;
    top: -14px;
    transition: background 0.3s ease;
}

.hmd-step-line.active {
    background: linear-gradient(90deg, #12B76A, #34D399, #12B76A);
    background-size: 200% 100%;
    animation: hmdLineShimmer 3s ease infinite;
    box-shadow: 0 0 8px rgba(18, 183, 106, 0.32);
}

/* Sub Tabs / Radzen Tabs Overrides */
.hmd-radzen-tabs,
.hmd-radzen-tabs.rz-tabview,
.hmd-radzen-tabs .rz-tabview-nav-container,
.hmd-radzen-tabs .rz-tabview-nav-content {
    border: none !important;
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
}

.hmd-radzen-tabs .rz-tabview-nav {
    display: flex !important;
    align-items: center !important;
    gap: 24px !important;
    border: none !important;
    border-bottom: 1px solid #E1E5EA !important;
    margin-bottom: 24px !important;
    padding: 0 !important;
    background: transparent !important;
    background-color: transparent !important;
    list-style: none !important;
    box-shadow: none !important;
}

.hmd-radzen-tabs .rz-tabview-nav li,
.hmd-radzen-tabs .rz-tabview-nav li.rz-tabview-item {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 8px 0 0px 0 !important;
    margin: 0 !important;
    cursor: pointer !important;
    box-shadow: none !important;
    border-bottom: 2px solid transparent !important;
    outline: none !important;
}

.hmd-radzen-tabs .rz-tabview-nav li a,
.hmd-radzen-tabs .rz-tabview-nav li .rz-tabview-nav-link,
.hmd-radzen-tabs .rz-tabview-nav li .rz-tabview-title {
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #808080 !important;
    text-decoration: none !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

/* Active / Selected Tab */
.hmd-radzen-tabs .rz-tabview-nav li.rz-tabview-selected,
.hmd-radzen-tabs .rz-tabview-nav li.rz-state-active,
.hmd-radzen-tabs .rz-tabview-nav li[aria-selected="true"] {
    background: transparent !important;
    background-color: transparent !important;
    border-bottom: 2px solid #0405AB !important;
}

.hmd-radzen-tabs .rz-tabview-nav li.rz-tabview-selected a,
.hmd-radzen-tabs .rz-tabview-nav li.rz-tabview-selected .rz-tabview-nav-link,
.hmd-radzen-tabs .rz-tabview-nav li.rz-tabview-selected .rz-tabview-title,
.hmd-radzen-tabs .rz-tabview-nav li.rz-state-active a,
.hmd-radzen-tabs .rz-tabview-nav li.rz-state-active .rz-tabview-nav-link,
.hmd-radzen-tabs .rz-tabview-nav li.rz-state-active .rz-tabview-title,
.hmd-radzen-tabs .rz-tabview-nav li[aria-selected="true"] a,
.hmd-radzen-tabs .rz-tabview-nav li[aria-selected="true"] .rz-tabview-nav-link,
.hmd-radzen-tabs .rz-tabview-nav li[aria-selected="true"] .rz-tabview-title {
    color: #0405AB !important;
    font-weight: 600 !important;
    background: transparent !important;
    background-color: transparent !important;
}

.hmd-radzen-tabs .rz-tabview-panels,
.hmd-radzen-tabs .rz-tabview-panel {
    padding: 0 !important;
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.hmd-sub-tabs {
    display: flex;
    align-items: center;
    gap: 24px;
    border-bottom: 1px solid #E1E5EA;
    margin-bottom: 14px;
}

.hmd-sub-tab {
    background: none;
    border: none;
    padding: 8px 0 10px 0;
    font-size: 14px;
    font-weight: 500;
    color: #808080;
    cursor: pointer;
    border-bottom: 2px solid transparent;
}

.hmd-sub-tab.active {
    color: #0405AB;
    font-weight: 600;
    border-bottom-color: #0405AB;
}

/* Design Output Table (Tab 1) */
.hmd-table-wrapper {
    border: 1px solid #E1E5EA;
    border-radius: 6px;
    overflow: hidden;
    background-color: #FFFFFF;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    width: 100%;
}

.hmd-table-scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.hmd-table-scroll::-webkit-scrollbar {
    height: 6px;
}

.hmd-table-scroll::-webkit-scrollbar-track {
    background: #F1F5F9;
}

.hmd-table-scroll::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 4px;
}

.hmd-table-scroll::-webkit-scrollbar-thumb:hover {
    background: #94A3B8;
}

.hmd-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.hmd-table th {
    background-color: #F8FAFC;
    color: #808080;
    font-weight: 500;
    padding: 10px 14px;
    border-bottom: 1px solid #E1E5EA;
    white-space: nowrap;
    height: 42px;
    box-sizing: border-box;
    font-size: 11.5px;
}

.hmd-table td {
    padding: 10px 14px;
    border-bottom: 1px solid #F1F5F9;
    color: #151515;
    white-space: nowrap;
    vertical-align: middle;
    height: 46px;
    box-sizing: border-box;
}

.hmd-table th.text-center,
.hmd-table td.text-center {
    text-align: center;
}

.hmd-product-name-pill {
    display: inline-block;
    padding: 4px 12px;
    background-color: #F4F3FF;
    border-radius: 4px;
    color: #151515;
    font-size: 12px;
    font-weight: 500;
}

/* Technical Development Details Table (Tab 2) */
.hmd-tech-wrapper {
    border: 1px solid #E1E5EA;
    border-radius: 6px;
    overflow-x: auto;
    background-color: #FFFFFF;
}

.hmd-tech-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.hmd-tech-table th {
    background-color: #EBEBFF;
    color: #151515;
    font-weight: 700;
    padding: 12px 16px;
    text-align: left;
    font-size: 12px;
    border-bottom: 1px solid #E1E5EA;
}

.hmd-tech-th-type {
    width: 22%;
}

.hmd-tech-th-col {
    width: 39%;
}

.hmd-tech-table td {
    padding: 8px 16px;
    border-bottom: 1px solid #F5F5F8;
    vertical-align: middle;
}

.hmd-tech-td-type {
    font-size: 12px;
    font-weight: 600;
    color: #151515;
}

.hmd-tech-val-pill {
    background-color: #F5F5F7;
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 12.5px;
    color: #666666;
    font-weight: 400;
    box-sizing: border-box;
}

/* Fixed Non-Scrollable Footer Action Bar */
.hmd-fixed-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 22px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.04);
    box-sizing: border-box;
    flex-shrink: 0;
}

.hmd-footer-left,
.hmd-footer-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hmd-btn-approved {
    height: 38px;
    padding: 0 20px;
    background-color: #0405AB;
    border: none;
    border-radius: 6px;
    color: #FFFFFF;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s;
}

.hmd-btn-approved:hover {
    opacity: 0.9;
}

.hmd-btn-email-customer {
    height: 38px;
    padding: 0 20px;
    background-color: #FFFFFF;
    border: 1px solid #D0D5DD;
    border-radius: 6px;
    color: #151515;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s;
}

.hmd-btn-email-customer:hover {
    background-color: #F8FAFC;
}

.hmd-btn-submit-prod {
    height: 38px;
    padding: 0 22px;
    background-color: #151515;
    border: none;
    border-radius: 6px;
    color: #FFFFFF;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s;
}

.hmd-btn-submit-prod:hover {
    background-color: #000000;
}

/* Pagination Footer Styles */
.hmd-pagination-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background-color: #FFFFFF;
    border-top: 1px solid #E1E5EA;
    box-sizing: border-box;
}

.hmd-pagination-info {
    font-size: 11.5px;
    color: #94A3B8;
    font-weight: 500;
}

.hmd-pagination-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.hmd-pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    font-size: 11.5px;
    font-weight: 600;
    color: #1A1A1A;
    background-color: #FFFFFF;
    border: 1px solid #D9E0E7;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    box-sizing: border-box;
    transition: all 0.15s ease;
}

.hmd-pagination-btn:hover:not(.active):not(.disabled) {
    background-color: #F8FAFC;
    border-color: #CBD5E1;
}

.hmd-pagination-btn.active {
    background-color: #0405AB;
    border-color: #0405AB;
    color: #FFFFFF;
}

.hmd-pagination-btn.disabled {
    color: #CBD5E1;
    border-color: #E2E8F0;
    cursor: not-allowed;
}

.hmd-pagination-btn svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.5;
}


/* Negotiated Cost Submit Button States & Validation */
.hmd-btn-submit-prod:disabled,
.hmd-btn-submit-prod.disabled {
    background-color: #94A3B8;
    cursor: not-allowed;
    opacity: 0.65;
}

.hmd-btn-submit-prod:disabled:hover,
.hmd-btn-submit-prod.disabled:hover {
    background-color: #94A3B8;
}

.hmd-input-error {
    border-color: #DC2626 !important;
    background-color: #FEF2F2 !important;
}

.hmd-cost-error-wrap {
    display: block;
    width: 100%;
    margin-top: 4px;
    box-sizing: border-box;
}

.hmd-error-text {
    font-size: 11.5px;
    color: #DC2626;
    font-weight: 500;
    line-height: 1.35;
    margin: 0;
    display: block;
}


/* ==========================================================================
   RESPONSIVE — Hajipur Marketing User PMR Details
   (/hajipur/marketing-user/pmr-details/{id})
   Laptop & desktop only (1200px – 1920px). Breakpoints follow
   css/responsive-layout.css.
   ========================================================================== */

/* All sizes: long company / city names wrap instead of overflowing. */
.hmd-spec-value {
    overflow-wrap: anywhere;
}

/* Standard laptops (1366 / 1440): narrower negotiation panel. */
@media (max-width: 1440px) {
    .hmd-top-grid {
        grid-template-columns: 1fr auto 400px;
        gap: 20px;
    }

    .hmd-card-body {
        padding: 18px;
    }

    .hmd-fixed-footer {
        padding: 12px 18px;
    }
}

/* Small laptops (1240 / 1280): give the PMR info more room and cut the
   stacked vertical gaps (spacer 26px + timeline margin 28px = 54px above
   the timeline) so less of the card needs scrolling on 720px tall screens. */
@media (max-width: 1280px) {
    .hmd-card-body {
        padding: 14px 16px;
    }

    .hmd-card-header {
        margin-bottom: 14px;
    }

    .hmd-title {
        font-size: 16px;
    }

    .hmd-top-grid {
        grid-template-columns: 1fr auto 360px;
        gap: 16px;
    }

    .hmd-specs-grid {
        column-gap: 16px;
        row-gap: 10px;
    }

    .hmd-spec-item {
        padding-bottom: 8px;
    }

    .hmd-spec-value {
        font-size: 12.5px;
    }

    .hmd-right-neg-card {
        gap: 10px;
    }

    .hmd-form-input {
        height: 36px;
    }

    .hmd-section-spacer {
        height: 8px;
    }

    .hmd-timeline-box {
        margin-top: 12px;
        padding: 14px 16px;
    }

    .hmd-section-divider {
        margin: 16px 0;
    }

    .hmd-section-title {
        margin-bottom: 10px;
        font-size: 14px;
    }

    /* Footer action bar */
    .hmd-fixed-footer {
        padding: 10px 16px;
        gap: 10px;
    }

    .hmd-footer-left,
    .hmd-footer-right {
        gap: 8px;
    }

    .hmd-btn-approved,
    .hmd-btn-email-customer,
    .hmd-btn-submit-prod {
        height: 36px;
        padding: 0 14px;
        font-size: 12.5px;
        white-space: nowrap;
    }
}
