/**
 * WIZ v2: Sales Rep Assigned Modal
 * Matches Figma: square photo, serif name, circular close, centered stack.
 */

body.wiz-sram--body-locked {
    overflow: hidden !important;
}

.wiz-sram {
    display: none;
    font-family: var(--wiz-font-family, inherit);
    box-sizing: border-box;
}

.wiz-sram *,
.wiz-sram *::before,
.wiz-sram *::after {
    box-sizing: inherit;
}

.wiz-sram[hidden] {
    display: none !important;
}

.wiz-sram--open {
    display: block !important;
}

/* Elementor editor: inline card preview (no full-screen overlay) */
.wiz-sram--editor-preview {
    display: block !important;
    position: relative;
}

.wiz-sram--editor-preview .wiz-sram__overlay {
    display: none !important;
}

.wiz-sram--editor-preview .wiz-sram__dialog {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    width: 100%;
    max-height: none;
    box-shadow: none;
    border: 1px solid #e5e5e5;
}

.wiz-sram--editor-preview .wiz-sram__close {
    display: none !important;
}

.wiz-sram__overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 99999;
}

.wiz-sram__dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(92vw, 480px);
    max-height: min(90vh, 760px);
    background: #fff;
    border-radius: 0;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.22);
    z-index: 100000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Visually hidden title for a11y (design has no visible header label) */
.wiz-sram__title.screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.wiz-sram__close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 2;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1.5px solid #1a1a1a;
    background: #fff;
    color: #1a1a1a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.wiz-sram__close:hover {
    background: #1a1a1a;
    color: #fff;
}

.wiz-sram__body {
    padding: 48px 40px 40px;
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.wiz-sram__empty-text {
    margin: 0;
    text-align: center;
    color: #666;
    font-size: 0.9375rem;
}

.wiz-sram__profile-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0;
}

.wiz-sram__avatar {
    width: 180px;
    height: 180px;
    border-radius: 0;
    overflow: hidden;
    background: #f3f3f3;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-bottom: 20px;
}

.wiz-sram__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.wiz-sram__avatar-initials {
    font-size: 2rem;
    font-weight: 600;
    color: #555;
    font-family: Georgia, "Times New Roman", serif;
}

.wiz-sram__name {
    margin: 0;
    margin-bottom: 12px;
    font-family: Georgia, "Times New Roman", Times, serif;
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
    color: #1a1a1a;
    letter-spacing: 0;
}

.wiz-sram__contact {
    display: flex;
    flex-direction: column;
    gap: 0;
    align-items: center;
    margin-bottom: 0;
}

.wiz-sram__email,
.wiz-sram__phone {
    font-family: var(--wiz-font-family, system-ui, -apple-system, sans-serif);
    font-size: 0.9375rem;
    line-height: 1.4;
    color: #333;
    text-decoration: none;
    display: block;
}

.wiz-sram__email:hover {
    text-decoration: underline;
}

.wiz-sram__divider {
    border: none;
    border-top: 1px solid #d8d8d8;
    margin: 20px 0;
    width: 100%;
}

.wiz-sram__bio-section {
    width: 100%;
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ~4.5 lines; half of last line peeks to hint scroll.
   Isolate scrolling from the modal body (nested overflow often blocks touch). */
.wiz-sram__bio {
    margin: 0;
    font-family: var(--wiz-font-family, system-ui, -apple-system, sans-serif);
    font-size: 0.875rem;
    line-height: 1.65;
    color: #555;
    text-align: center;
    width: 100%;
    max-height: calc(1.65em * 4.5);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
}

.wiz-sram__bio p {
    margin: 0 0 0.75em;
}

.wiz-sram__bio p:last-child {
    margin-bottom: 0;
}

.wiz-sram__slider {
    position: relative;
    display: flex;
    align-items: center;
    gap: 4px;
}

.wiz-sram__viewport {
    overflow: hidden;
    width: 100%;
}

.wiz-sram__track {
    display: flex;
    transition: transform 0.35s ease;
}

.wiz-sram__slide {
    flex: 0 0 100%;
    width: 100%;
    padding: 0;
}

.wiz-sram__arrow {
    position: absolute;
    top: 90px;
    z-index: 2;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #ccc;
    background: #fff;
    cursor: pointer;
    font-size: 0.875rem;
    color: #333;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.wiz-sram__arrow--prev {
    left: -6px;
}

.wiz-sram__arrow--next {
    right: -6px;
}

.wiz-sram__arrow:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.wiz-sram__arrow[hidden] {
    display: none !important;
}

@media (max-width: 640px) {
    .wiz-sram__body {
        padding: 40px 24px 28px;
    }

    .wiz-sram__avatar {
        width: 140px;
        height: 140px;
    }

    .wiz-sram__name {
        font-size: 1.375rem;
    }

    .wiz-sram__arrow {
        top: 70px;
    }
}
