/* =====================================================================
   HAJIPUR DESIGN OUTPUT CUSTOMER EMAIL — CSS
   ===================================================================== */

.hdo-page {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 6px 10px 20px 10px;
    box-sizing: border-box;
    font-family: inherit;
    background: transparent;
    min-height: calc(100vh - 78px);
}

/* Top Summary Card */
.hdo-card {
    background: #FFFFFF;
    border: 1px solid #E5E5EE;
    border-radius: 10px;
    padding: 16px 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.hdo-card-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.hdo-title-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hdo-card-title {
    font-size: 15px;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.hdo-info-badge-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    line-height: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.hdo-info-icon {
    width: 18px;
    height: 18px;
    display: block;
}

/* Light teal Design Output pill badge */
.hdo-badge-teal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 14px;
    height: 24px;
    border-radius: 50px;
    font-size: 11.5px;
    font-weight: 500;
    background-color: #E7F4F8;
    border: 1px solid #219CBA;
    color: #219CBA;
    line-height: 1;
    white-space: nowrap;
    box-sizing: border-box;
}

/* Inline Status Note (next to Design Output badge) */
.hdo-status-note {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    height: 24px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    box-sizing: border-box;
}

.hdo-status-note.approved {
    background-color: #D1FAE5;
    border: 1px solid #10B981;
    color: #065F46;
}

.hdo-status-note.rejected {
    background-color: #FEE2E2;
    border: 1px solid #EF4444;
    color: #991B1B;
}

/* Info Grid (4 columns) */
.hdo-info-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    column-gap: 24px;
    row-gap: 14px;
}

.hdo-info-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.hdo-info-label {
    font-size: 11px;
    font-weight: 600;
    color: #111827;
    line-height: 1.3;
}

.hdo-info-value {
    font-size: 12.5px;
    font-weight: 400;
    color: #808080;
    line-height: 1.4;
    word-break: break-all;
}

/* Subtabs Navigation Bar */
.hdo-tabs-bar {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-top: 4px;
    border-bottom: 1px solid #E5E7EB;
    padding-left: 4px;
}

.hdo-tab-btn {
    background: transparent;
    border: none;
    outline: none;
    padding: 10px 0;
    font-size: 13.5px;
    font-weight: 500;
    color: #808080;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.15s ease;
    font-family: inherit;
}

.hdo-tab-btn:hover {
    color: #111827;
}

.hdo-tab-btn.active {
    color: #0405AB;
    font-weight: 600;
    border-bottom: 2px solid #0405AB;
}

/* Unified Card Container for Tables */
.hdo-table-card {
    background: #FFFFFF;
    border: 1px solid #E5E5EE;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.hdo-table-responsive {
    width: 100%;
    overflow-x: auto;
    background: #FFFFFF;
}

/* Product Details Table (Tab 0) */
.hdo-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.hdo-table th {
    background-color: #FAFBFD;
    color: #808080;
    font-weight: 500;
    font-size: 12px;
    text-align: left;
    padding: 12px 16px;
    border-bottom: 1px solid #E5E7EB;
    white-space: nowrap;
}

.hdo-table td {
    padding: 10px 14px;
    border-bottom: 1px solid #F3F4F6;
    color: #1F2937;
    vertical-align: middle;
    white-space: nowrap;
}

.hdo-table tbody tr:last-child td {
    border-bottom: 1px solid #F3F4F6;
}

.hdo-table tbody tr:hover {
    background-color: #F9FAFB;
}

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

.hdo-product-pill {
    display: inline-block;
    background-color: #F0F2FF;
    color: #1E1B4B;
    font-weight: 500;
    font-size: 12.5px;
    padding: 4px 12px;
    border-radius: 6px;
}

/* Pagination inside unified card */
.hdo-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background-color: #FFFFFF;
}

.hdo-pagination-info {
    font-size: 12.5px;
    color: #808080;
}

.hdo-pagination-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

.hdo-page-nav-btn {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #E5E7EB;
    background-color: #FFFFFF;
    color: #374151;
    font-size: 12px;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    padding: 0;
}

.hdo-page-nav-btn.disabled {
    color: #D1D5DB;
    cursor: not-allowed;
}

.hdo-page-btn {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #E5E7EB;
    background-color: #FFFFFF;
    color: #374151;
    font-size: 12.5px;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    padding: 0;
}

.hdo-page-btn.active {
    background-color: #0405AB;
    border-color: #0405AB;
    color: #FFFFFF;
}

/* ================================================================
   TECHNICAL DEVELOPMENT DETAILS TABLE (Tab 1)
   ================================================================ */
.hdo-tech-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
    padding: 16px 20px;
    box-sizing: border-box;
}

.hdo-tech-table th {
    background-color: #EEF0FD;
    color: #151515;
    font-weight: 700;
    font-size: 13px;
    text-align: left;
    padding: 12px 16px;
    border: none;
    white-space: nowrap;
}

.hdo-tech-table th:first-child {
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

.hdo-tech-table th:last-child {
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

.hdo-tech-table td {
    padding: 4px 10px;
    vertical-align: middle;
    border: none;
}

.hdo-tech-type-cell {
    font-size: 13px;
    font-weight: 500;
    color: #151515;
    white-space: nowrap;
}

.hdo-tech-input {
    width: 100%;
    height: 34px;
    padding: 0 12px;
    font-size: 13px;
    font-weight: 400;
    color: #808080;
    background-color: #F3F4F6;
    border: none;
    border-radius: 6px;
    outline: none;
    box-sizing: border-box;
    font-family: inherit;
}

/* Action Buttons Footer Bar for Tab 1 */
.hdo-tech-actions-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    background-color: #FFFFFF;
    border-top: 1px solid #F0F1F5;
    width: 100%;
    box-sizing: border-box;
}

.hdo-tech-actions-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hdo-tech-actions-right {
    display: flex;
    align-items: center;
}

.hdo-btn-approved {
    background-color: #FFFFFF;
    color: #151515;
    border: 1px solid #E5E5EE;
    border-radius: 6px;
    padding: 10px 22px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
}

.hdo-btn-approved:hover {
    background-color: #F8F9FA;
    border-color: #CCCCCC;
}

.hdo-btn-reject {
    background-color: #0E131F;
    color: #FFFFFF;
    border: none;
    border-radius: 6px;
    padding: 10px 22px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s ease;
    font-family: inherit;
}

.hdo-btn-reject:hover {
    background-color: #1A2238;
}

.hdo-btn-email {
    background-color: #0405AB;
    color: #FFFFFF;
    border: none;
    border-radius: 6px;
    padding: 10px 24px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s ease;
    font-family: inherit;
}

.hdo-btn-email:hover {
    background-color: #03048A;
}


/* =====================================================================
   Product Code Input & Save Button Styles
   ===================================================================== */

.hdo-product-code-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hdo-product-code-input {
    flex: 1;
    padding: 6px 10px;
    font-size: 13px;
    font-weight: 400;
    color: #1F2937;
    background-color: #F9FAFB;
    border: 1px solid #D1D5DB;
    border-radius: 4px;
    transition: all 0.2s ease;
    min-width: 0;
}

.hdo-product-code-input:hover {
    border-color: #9CA3AF;
    background-color: #FFFFFF;
}

.hdo-product-code-input:focus {
    outline: none;
    border-color: #9CA3AF;
    background-color: #FFFFFF;
    box-shadow: 0 0 0 2px rgba(108, 117, 125, 0.2);
}

.hdo-product-code-input::placeholder {
    color: #9CA3AF;
    font-size: 12px;
}

.hdo-product-code-save-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background-color: #0405AB;
    border: 1px solid #0405AB;
    border-radius: 4px;
    color: #FFFFFF;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.hdo-product-code-save-btn:hover:not(:disabled) {
    background-color: #030488;
    border-color: #030488;
    box-shadow: 0 2px 4px rgba(4, 5, 171, 0.2);
}

.hdo-product-code-save-btn:active:not(:disabled) {
    transform: translateY(1px);
}

.hdo-product-code-save-btn:disabled {
    background-color: #9CA3AF;
    border-color: #9CA3AF;
    cursor: not-allowed;
    opacity: 0.6;
}

.hdo-product-code-save-btn svg {
    display: block;
}

/* Spinner animation */
@keyframes hdo-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.hdo-spinner {
    animation: hdo-spin 1s linear infinite;
}

/* =====================================================================
   APPROVAL STATUS BANNER
   ===================================================================== */

.hdo-approval-status-banner {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 20px;
    border-radius: 8px;
    margin: 16px;
    border-left: 4px solid;
}

.hdo-approval-status-banner.approved {
    background-color: #F0FDF4;
    border-left-color: #22C55E;
    color: #166534;
}

.hdo-approval-status-banner.rejected {
    background-color: #FEF2F2;
    border-left-color: #EF4444;
    color: #991B1B;
}

.hdo-status-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
}

.hdo-status-icon svg {
    width: 100%;
    height: 100%;
}

.hdo-approval-status-banner.approved .hdo-status-icon {
    color: #22C55E;
}

.hdo-approval-status-banner.rejected .hdo-status-icon {
    color: #EF4444;
}

.hdo-status-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.hdo-status-title {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
}

.hdo-approval-status-banner.approved .hdo-status-title {
    color: #166534;
}

.hdo-approval-status-banner.rejected .hdo-status-title {
    color: #991B1B;
}

.hdo-status-date {
    font-size: 13px;
    font-weight: 500;
    opacity: 0.8;
}

.hdo-status-comment {
    margin-top: 4px;
    padding: 12px;
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.5;
}

.hdo-status-comment strong {
    font-weight: 600;
    margin-right: 4px;
}

/* Disabled button styles */
.hdo-btn-approved:disabled,
.hdo-btn-reject:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}


/* =====================================================================
   RESPONSIVE — Hajipur Design Output (/hajipur/design-output)
   Laptop & desktop only (1200px – 1920px). Breakpoints follow
   css/responsive-layout.css.
   ===================================================================== */

/* All sizes: the title row holds the title, status badge, Download button,
   Approved/Rejected note and the rejection "Reason" note on one line.
   Let it wrap, and cut a long reason with "…" (the full text is in the
   span's title tooltip) so it can't push past the card edge. */
.hdo-title-wrap {
    flex-wrap: wrap;
    row-gap: 6px;
    min-width: 0;
}

.hdo-status-note[title] {
    display: inline-block;
    max-width: 420px;
    line-height: 16px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Large laptops and below (<= 1600px): the Product Details table needed
   ~1360px because every header stays on one line and the Product Code /
   Product Name inputs keep their default ~170px width. Let the long
   headers wrap and let the inputs shrink (down to 110px) so the table
   fits without sideways scrolling. */
@media (max-width: 1600px) {
    .hdo-table th {
        white-space: normal;
        line-height: 1.3;
        vertical-align: bottom;
    }

    .hdo-product-code-input {
        width: 0;
        min-width: 110px;
    }
}

/* Standard laptops (1366 / 1440) */
@media (max-width: 1440px) {
    .hdo-table th {
        padding: 10px 12px;
    }

    .hdo-table td {
        padding: 8px 12px;
    }

    .hdo-info-grid {
        column-gap: 16px;
    }
}

/* Small laptops (1240 / 1280) */
@media (max-width: 1280px) {
    .hdo-page {
        gap: 12px;
        padding: 4px 4px 16px 4px;
    }

    .hdo-card {
        padding: 12px 14px;
    }

    .hdo-card-title-row {
        margin-bottom: 12px;
    }

    .hdo-info-grid {
        column-gap: 12px;
        row-gap: 10px;
    }

    .hdo-tab-btn {
        font-size: 13px;
    }

    /* Product Details table */
    .hdo-table th {
        padding: 8px 10px;
    }

    .hdo-table td {
        padding: 6px 10px;
    }

    .hdo-product-code-wrapper {
        gap: 6px;
    }

    .hdo-product-code-save-btn {
        width: 30px;
        height: 30px;
    }

    /* Technical Development table */
    .hdo-tech-table {
        padding: 10px 14px;
        border-spacing: 0 8px;
    }

    .hdo-tech-table th {
        padding: 10px 12px;
    }

    .hdo-tech-input {
        height: 32px;
    }

    /* Action bar: buttons wrap instead of overflowing when all five show. */
    .hdo-tech-actions-bar {
        flex-wrap: wrap;
        padding: 12px 14px;
        gap: 10px;
    }

    .hdo-tech-actions-left,
    .hdo-tech-actions-right {
        flex-wrap: wrap;
        gap: 8px;
    }

    .hdo-btn-approved,
    .hdo-btn-reject,
    .hdo-btn-email {
        padding: 8px 16px;
        font-size: 12.5px;
    }
}
