﻿
.notes-large-text,
.notes-large-text * {
    font-size: 1.25rem !important;
    line-height: 1.6 !important;
}





/* ═══════════════════════════════════════════════════════════════════════════════
           CONTAINER
           ═══════════════════════════════════════════════════════════════════════════════ */
   
.wt-container {
    background-color: #fafafa;
    width: 78vw;
    max-width: 1280px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0,0,0,.28);
    max-height: 90vh;
    overflow: hidden;
 /*   overflow-y: auto;*/
}

.wt-scale-from-center {
    opacity: 0;
    transform: scale(0.85);
    transform-origin: center center;
}

    .wt-scale-from-center.grow {
        animation: smooth-open 0.5s ease-out forwards;
    }

@keyframes smooth-open {
    0% {
        opacity: 0;
        transform: scale(0.85);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* ═══════════════════════════════════════════════════════════════════════════════
           HEADER
           ═══════════════════════════════════════════════════════════════════════════════ */
.wt-header {
    background: linear-gradient(135deg, #1565c0 0%, #0d47a1 100%);
    color: white;
    padding: 14px 24px;
    border-radius: 12px 12px 0 0;
}

.wt-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wt-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.wt-chart-btn {
    min-width: 40px;
    padding: 4px;
}

.wt-client-info {
    display: flex;
    flex-direction: column;
}

.wt-client-name {
    font-weight: 700;
    color: white;
    letter-spacing: .3px;
}

.wt-client-address {
    color: rgba(255,255,255,.82);
    font-size: .85rem;
}

.wt-header {
    background: linear-gradient(135deg, #1565c0 0%, #0d47a1 100%);
    color: white;
    padding: 14px 24px;
    border-radius: 12px 12px 0 0;
}

.wt-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wt-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.wt-chart-btn {
    min-width: 40px;
    padding: 4px;
}

.wt-client-info {
    display: flex;
    flex-direction: column;
}

.wt-client-name {
    font-weight: 700;
    color: white;
    letter-spacing: .3px;
}

.wt-client-address {
    color: rgba(255,255,255,.82);
    font-size: .85rem;
}

.wt-header-right .mud-chip,
.wt-ticket-chip {
    background-color: rgba(255,255,255,.18);
    color: white;
    font-weight: 600;
    font-size: .95rem;
    letter-spacing: .3px;
}

    .wt-ticket-chip.mud-chip:hover {
        background-color: rgba(255,255,255,.18)!important;
    }


.wt-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.wt-close-x {
    color: #ff5252 !important;
    background-color: rgba(255, 255, 255, 0.9); /* slight opacity helps visibility */
    border-radius: 50%;
    width: 36px;
    height: 36px;
    /* Key: enable smooth scaling */
    transition: transform 0.2s ease-in-out, background-color 0.2s ease, color 0.15s ease;
    /* Optional: center content if it's an icon/button */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer; /* if clickable */
}

    .wt-close-x:hover {
      
        transform: scale(1.15); /* ← 15% larger */
        background-color: rgba(255, 255, 255, 0.9); /* light red tint – uncommented & improved */
        color: #ff1744 !important;
        /* font-weight: 900;  ← usually not needed for icons – remove unless it's text */
    }

/* ═══════════════════════════════════════════════════════════════════════════════
           STATUS BAR
           ═══════════════════════════════════════════════════════════════════════════════ */
.wt-status-bar {
    background-color: #f5f5f5;
    padding: 10px 24px;
    border-bottom: 1px solid #e0e0e0;
}

.wt-status-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.wt-status-chips {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.wt-svctype-container {
    max-width: 250px;
}

/* ── Tech badges ── */
.wt-tech-panel {
    display: flex;
    gap: 10px;
    margin-left: auto;
    flex-shrink: 0;
}

.wt-tech-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: .92rem;
}

.wt-tech-primary {
    background-color: #e8f5e9;
    border: 1.5px solid #66bb6a;
    color: #2e7d32;
}

.wt-tech-helper {
    background-color: #fff3e0;
    border: 1.5px solid #ffb74d;
    color: #e65100;
}

.wt-add-tech-btn {
    border-style: dashed !important;
    font-size: 0.8rem;
}

.wt-tech-detail {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.wt-tech-role {
    font-size: .65rem;
    text-transform: uppercase;
    letter-spacing: .6px;
    font-weight: 600;
    opacity: .7;
}

.wt-tech-name {
    font-size: 1rem;
    font-weight: 700;
}

/* ═══════════════════════════════════════════════════════════════════════════════
           DETAILS ROW
           ═══════════════════════════════════════════════════════════════════════════════ */
.wt-details {
    padding: 12px 24px;
    background-color: white;
    border-bottom: 1px solid #eeeeee;
}

.wt-field-full {
    width: 100%;
}

.wt-date-btn {
    height: 54px;
    text-transform: none;
}

.wt-date-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.wt-date-label {
    font-size: .72rem;
    color: #757575;
}

.wt-date-value {
    font-size: 1rem;
    font-weight: 700;
    color: #d32f2f;
}



/* ═══════════════════════════════════════════════════════════════════════════════
           SCROLLABLE BODY
           ═══════════════════════════════════════════════════════════════════════════════ */
.wt-body {
    flex: 1 1 auto;
    padding: 16px 24px;
    overflow-y: auto;
    background-color: #fafafa;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 0;
    
}

.wt-note-card {
    display: flex;
    flex-direction: column;
    border-radius: 8px;
    height: auto; /* shrink to content */
    max-height: 200px; /* but cap it and scroll if tall */
}



.wt-note-header {
    padding: 10px 16px;
    min-height: auto;
}

.wt-dispatch-hdr {
    background-color: #e3f2fd;
    border-bottom: 2px solid #1976d2;
}

.wt-callfirst-hdr {
    background-color: #fff3e0;
    border-bottom: 2px solid #f57c00;
}

.wt-note-hdr-row {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.wt-note-body {
    padding: 10px;
    display: flex;
    flex-direction: column;
    overflow-y: auto; /* scroll kicks in when card hits max-height */
    min-height: 0; /* critical — allows flex child to shrink below its content size */
}



/*.wt-note-body {
    overflow-y: auto;
    min-height: 0;
    flex: 1;
    padding: 14px;
    display: flex;
    flex-direction: column;
}
*/
.wt-prev-notes {
    cursor: pointer;
    flex: 1;
    display: flex;
    flex-direction: column;
}

    .wt-prev-notes:hover .wt-prev-notes-text {
        border-color: #90caf9;
    }

.wt-prev-notes-text {
    background-color: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 10px;
    /* max-height: 140px; ← remove this */
    overflow-y: visible; /* let the card handle it */
    white-space: pre-wrap;
    font-size: .875rem;
    color: #616161;
    transition: border-color .15s;
}
/* ═══════════════════════════════════════════════════════════════════════════════
           LINE ITEMS
           ═══════════════════════════════════════════════════════════════════════════════ */
.wt-lineitems-panel {
    flex-shrink: 0;
    min-height: 150px;
    border-radius: 8px;
    overflow: hidden;
}

.wt-lineitems-header {
    padding: 10px 16px;
    background-color: #f5f5f5;
    border-bottom: 2px solid #1976d2;
}

.wt-lineitems-table {
    font-size: .88rem;
}

    .wt-lineitems-table th {
        background-color: #fafafa;
        font-weight: 600;
        color: #424242;
    }

.wt-item-code {
    font-weight: 600;
    color: #1565c0;
    font-family: 'Roboto Mono', monospace;
}

.wt-additem-panel {
    padding: 12px 16px;
    background-color: #e3f2fd55;
    border-bottom: 1px solid #e0e0e0;
}

.wt-quickpick-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.wt-quickpick-chip {
    cursor: pointer;
}

.wt-additem-confirm {
    margin-top: 12px;
    padding: 10px 12px;
    background-color: #fff;
    border: 1px solid #bbdefb;
    border-radius: 6px;
}

.wt-search-item {
    display: flex;
    min-width: 100%;
    align-items: center;
    gap: 10px;
    padding: 2px 0;
}

.wt-search-code {
    font-weight: 600;
    color: #1565c0;
    min-width: 80px;
    font-family: 'Roboto Mono', monospace;
}

.wt-search-desc {
    flex: 1;
}

.wt-search-price {
    color: #388e3c;
    font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════════════════════════
           NOTES OVERLAY
           ═══════════════════════════════════════════════════════════════════════════════ */
.wt-notes-overlay {
    width: 60vw;
    max-width: 900px;
    max-height: 75vh;
    display: flex;
    flex-direction: column;
}

.wt-notes-overlay-hdr {
    background: linear-gradient(135deg, #1565c0 0%, #0d47a1 100%);
}

.wt-notes-overlay-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.wt-notes-overlay-text {
    font-family: 'Segoe UI', 'Roboto', sans-serif;
    font-size: 1.15rem;
    line-height: 1.65;
    color: #212121;
    white-space: pre-wrap;
    word-wrap: break-word;
    margin: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════════
           ACTIONS / FOOTER
           ═══════════════════════════════════════════════════════════════════════════════ */
/*.wt-actions {
    padding: 10px 24px;
    background-color: #f5f5f5;
    border-top: 1px solid #e0e0e0;
}*/
.wt-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
    padding: 8px 24px;
    background-color: #f5f5f5;
    border-top: 1px solid #e0e0e0;
}

.wt-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 30px;
    padding: 0 12px;
    font-size: 1.1rem;
    font-family: inherit;
    border: none;
    border-radius: 4px;
    color: #fff;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.2s;
}

    .wt-btn:hover {
        opacity: 0.85;
    }

    .wt-btn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

    .wt-btn .material-icons {
        font-size: 16px;
    }

.wt-btn-info {
    background-color: #2196F3;
}

.wt-btn-success {
    background-color: #4CAF50;
}



/* Footer stays pinned at the bottom of the flex container */
.wt-footer {
    flex: 0 0 auto; /* don't grow or shrink */
    padding: 14px 24px;
    background-color: white;
    border-top: 1px solid #e0e0e0;
    animation: wtfooterSlideDown 2s ease-out forwards;
    overflow: visible; /* was 'hidden' — that was clipping the buttons */
    /* Remove position:sticky — no longer needed with flex layout */
    z-index: 10;
    bottom:0;
}

/*.wt-footer {
    padding: 14px 24px;
    background-color: white;
    border-top: 1px solid #e0e0e0;
    animation: wtfooterSlideDown 2s ease-out forwards;
    overflow: hidden;
    position: sticky;
    bottom: 0;
    z-index: 10;
}*/
@keyframes wtfooterSlideDown {
    from {
        transform: translateY(-16px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}


.wt-btn-center {
    display: flex;
    justify-content: center;
}

/* ═══════════════════════════════════════════════════════════════════════════════
           DIALOG STYLES (reused)
           ═══════════════════════════════════════════════════════════════════════════════ */

.wt-notes-dialog .mud-dialog-close-button {
    color: #ff5252 !important;
    background-color: rgba(255, 255, 255, 0.9)!important;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    transition: transform 0.2s ease-in-out, background-color 0.2s ease, color 0.15s ease;
}

    .wt-notes-dialog .mud-dialog-close-button:hover {
        transform: scale(1.15);
        color: #ff1744 !important;
    }


.schedule-dialog {
    width: 600px;
    max-width: 90vw;
}

.wt-datepicker-dialog {
    min-width: 350px;
}

.wt-datepicker-hdr {
    background-color: #1976d2;
    color: white;
}

    .wt-datepicker-hdr .mud-typography {
        color: white;
    }

.correspondence-section {
    flex: 1;
    padding: 16px 24px;
    overflow-y: auto;
}

.wt-actions,
.wt-footer {
    flex: 0 0 auto;
    flex-shrink: 0;
}
