/* ═══════════════════════════════════════════
   UreTech Ticket Lifecycle Widget
   Mobile-first responsive CSS
   Prefix: .ure-tf-
   ═══════════════════════════════════════════ */

/* ── Root ── */
.ure-tf-root {
    font-family: 'Outfit', sans-serif;
    position: relative;
    padding: 16px;
    box-sizing: border-box;
    background: var(--tf-bg, #060510);
    color: var(--tf-text, #FAFAFA);
}

/* ── Wrapper ── */
.ure-tf-wrapper {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
}

/* ── Header ── */
.ure-tf-header {
    text-align: center;
    margin-bottom: 20px;
    padding: 0 8px;
}

.ure-tf-badge {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 100px;
    background: rgba(193, 191, 230, 0.08);
    border: 1px solid rgba(193, 191, 230, 0.12);
    font-size: 10px;
    letter-spacing: 1.5px;
    font-weight: 600;
    opacity: 0.6;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.ure-tf-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 6px;
    line-height: 1.3;
    color: var(--tf-text, #FAFAFA);
}

.ure-tf-description {
    font-size: 13px;
    opacity: 0.5;
    margin: 0;
    line-height: 1.5;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* ── Board Outer (scroll container + arrows) ── */
.ure-tf-board-outer {
    position: relative;
}

/* ── Nav Arrows ── */
.ure-tf-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(193, 191, 230, 0.1);
    border: 1px solid rgba(193, 191, 230, 0.15);
    color: var(--tf-text, #FAFAFA);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s ease, border-color 0.2s ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.ure-tf-arrow:hover {
    background: rgba(193, 191, 230, 0.18);
    border-color: rgba(193, 191, 230, 0.25);
}

.ure-tf-arrow--left {
    left: -4px;
}

.ure-tf-arrow--right {
    right: -4px;
}

.ure-tf-arrow svg {
    display: block;
    flex-shrink: 0;
}

/* ── Board (horizontal scroll on mobile) ── */
.ure-tf-board {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 4px 2px 12px;
    scrollbar-width: none;
}

.ure-tf-board::-webkit-scrollbar {
    display: none;
}

/* ── Column ── */
.ure-tf-column {
    min-width: 260px;
    flex: 0 0 260px;
    scroll-snap-align: start;
    background: rgba(193, 191, 230, 0.04);
    border: 1px solid rgba(193, 191, 230, 0.1);
    border-radius: 14px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: border-color 0.25s ease;
}

.ure-tf-column:hover {
    border-color: rgba(193, 191, 230, 0.18);
}

/* ── Column Header ── */
.ure-tf-col-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(193, 191, 230, 0.08);
    margin-bottom: 4px;
}

.ure-tf-col-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(193, 191, 230, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ure-tf-col-icon svg {
    display: block;
}

.ure-tf-col-name {
    font-size: 13px;
    font-weight: 600;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--tf-text, #FAFAFA);
}

/* ── Counter Badge ── */
.ure-tf-counter {
    font-size: 11px;
    font-weight: 700;
    min-width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ure-tf-counter--badge {
    padding: 0 7px;
    border-radius: 100px;
    background: rgba(193, 191, 230, 0.1);
    color: var(--tf-text, #FAFAFA);
}

.ure-tf-counter--number {
    padding: 0;
    background: none;
    color: var(--tf-col-color, #C1BFE6);
    font-size: 14px;
}

.ure-tf-counter--pop {
    animation: ure-tf-pop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes ure-tf-pop {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.35); }
    100% { transform: scale(1); }
}

/* ── Cards Container ── */
.ure-tf-cards {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 60px;
}

/* ── Ticket Card ── */
.ure-tf-card {
    background: rgba(193, 191, 230, 0.06);
    border: 1px solid rgba(193, 191, 230, 0.1);
    border-radius: var(--tf-card-radius, 12px);
    padding: 10px 12px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    cursor: default;
}

.ure-tf-card:hover {
    border-color: rgba(193, 191, 230, 0.2);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

/* ── Card Entry / Exit Animations ── */
.ure-tf-card--enter {
    opacity: 0;
    transform: translateX(-12px);
}

.ure-tf-card--visible {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.ure-tf-card--exit {
    opacity: 0;
    transform: translateX(16px);
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Priority Badge ── */
.ure-tf-priority {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 100px;
    margin-bottom: 6px;
    text-transform: capitalize;
    letter-spacing: 0.3px;
}

.ure-tf-priority--alta {
    background: rgba(248, 113, 113, 0.15);
    color: var(--tf-high, #F87171);
}

.ure-tf-priority--media {
    background: rgba(251, 191, 36, 0.15);
    color: var(--tf-medium, #FBBF24);
}

.ure-tf-priority--bassa {
    background: rgba(74, 222, 128, 0.15);
    color: var(--tf-low, #4ADE80);
}

/* ── Card Title ── */
.ure-tf-card-title {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--tf-text, #FAFAFA);
    margin-bottom: 4px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* ── Card Assigned ── */
.ure-tf-card-assigned {
    font-size: 10px;
    opacity: 0.4;
    font-weight: 500;
}


/* ══════════════════════════════════════
   TABLET (768px+)
   2x2 grid layout
   ══════════════════════════════════════ */
@media (min-width: 768px) {
    .ure-tf-root {
        padding: 24px;
    }

    .ure-tf-header {
        margin-bottom: 24px;
    }

    .ure-tf-title {
        font-size: 24px;
    }

    .ure-tf-description {
        font-size: 14px;
    }

    /* Hide nav arrows on tablet+ */
    .ure-tf-arrow {
        display: none;
    }

    /* 2x2 grid */
    .ure-tf-board {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 14px;
        overflow-x: visible;
        scroll-snap-type: none;
        padding: 4px 0 0;
    }

    .ure-tf-column {
        min-width: 0;
        flex: none;
        scroll-snap-align: none;
        padding: 16px;
    }

    .ure-tf-col-name {
        font-size: 14px;
    }

    .ure-tf-card-title {
        font-size: 13px;
    }
}


/* ══════════════════════════════════════
   DESKTOP (1024px+)
   4 columns side-by-side
   ══════════════════════════════════════ */
@media (min-width: 1024px) {
    .ure-tf-root {
        padding: 32px 24px;
    }

    .ure-tf-header {
        margin-bottom: 28px;
    }

    .ure-tf-title {
        font-size: 26px;
    }

    /* 4 column layout */
    .ure-tf-board {
        display: flex;
        gap: 16px;
        overflow-x: visible;
    }

    .ure-tf-column {
        flex: 1 1 0%;
        min-width: 0;
    }

    .ure-tf-column:hover {
        border-color: rgba(193, 191, 230, 0.22);
    }

    .ure-tf-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    }

    .ure-tf-col-header {
        padding-bottom: 12px;
    }

    .ure-tf-col-icon {
        width: 30px;
        height: 30px;
    }

    .ure-tf-col-name {
        font-size: 14px;
    }

    .ure-tf-card {
        padding: 12px 14px;
    }

    .ure-tf-card-title {
        font-size: 13px;
    }

    .ure-tf-card-assigned {
        font-size: 11px;
    }

    .ure-tf-counter {
        min-width: 24px;
        height: 24px;
    }
}


/* ══════════════════════════════════════
   LARGE DESKTOP (1440px+)
   max-width 1200px
   ══════════════════════════════════════ */
@media (min-width: 1440px) {
    .ure-tf-wrapper {
        max-width: 1200px;
    }

    .ure-tf-root {
        padding: 40px 32px;
    }

    .ure-tf-title {
        font-size: 28px;
    }

    .ure-tf-board {
        gap: 20px;
    }

    .ure-tf-column {
        padding: 18px;
        border-radius: 16px;
    }

    .ure-tf-card {
        padding: 14px 16px;
    }

    .ure-tf-card-title {
        font-size: 14px;
    }

    .ure-tf-priority {
        font-size: 11px;
        padding: 3px 10px;
    }

    .ure-tf-counter--number {
        font-size: 16px;
    }
}


/* ══════════════════════════════════════
   REDUCED MOTION
   Instant moves, no animations
   ══════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
    .ure-tf-card--enter {
        opacity: 1;
        transform: none;
    }

    .ure-tf-card--visible {
        transition: none;
    }

    .ure-tf-card--exit {
        transition: none;
    }

    .ure-tf-counter--pop {
        animation: none;
    }

    .ure-tf-card {
        transition: none;
    }

    .ure-tf-column {
        transition: none;
    }

    .ure-tf-arrow {
        transition: none;
    }
}
