/* ═══════════════════════════════════════════════════════════════════
   WAVE 2 PRODUCTIVITY - shared styles for:
   - linkedin-about-generator (.wp2-about__*)
   - time-zone-meeting-grid    (.wp2-tzg__*)

   Namespace: wp2- (BEM). Bootstrap 5.3 first; custom only where needed.
═══════════════════════════════════════════════════════════════════ */

/* ─── Shared atoms ─── */

.wp2-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
@media (max-width: 640px) {
    .wp2-row { grid-template-columns: 1fr; }
}

.wp2-field { display: block; margin-bottom: 1rem; }
.wp2-field:last-child { margin-bottom: 0; }

.wp2-label {
    display: block;
    font-weight: 600;
    font-size: .875rem;
    color: var(--color-text, #1f2937);
    margin-bottom: .375rem;
}

.wp2-label__hint {
    font-weight: 500;
    color: var(--color-text-muted, #6b7280);
    font-size: .8125rem;
    margin-left: .25rem;
}

/* Chip input (skills, selected cities) */
.wp2-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .375rem;
    min-height: 2.5rem;
    padding: .375rem .5rem;
    border: 1px solid #ced4da;
    border-radius: .375rem;
    background: #fff;
    cursor: text;
}
.wp2-chips:focus-within {
    border-color: #86b7fe;
    box-shadow: 0 0 0 .25rem rgba(13, 110, 253, .15);
}
.wp2-chips__input {
    flex: 1;
    min-width: 8rem;
    border: 0;
    outline: 0;
    padding: .25rem 0;
    font-size: 1rem;
    background: transparent;
}
.wp2-chip {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    background: #e7f1ff;
    color: #0a58ca;
    border-radius: 999px;
    padding: .125rem .5rem .125rem .625rem;
    font-size: .875rem;
    font-weight: 500;
}
.wp2-chip__x {
    appearance: none;
    background: transparent;
    border: 0;
    color: inherit;
    opacity: .65;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    padding: 0 0 0 .125rem;
}
.wp2-chip__x:hover { opacity: 1; }

/* ═══════════════════════════════════════════════════════════════════
   LINKEDIN ABOUT GENERATOR
═══════════════════════════════════════════════════════════════════ */

.wp2-about {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    gap: 1.5rem;
}
@media (max-width: 960px) {
    .wp2-about { grid-template-columns: 1fr; }
}

.wp2-about__form {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: .5rem;
    padding: 1.25rem;
}

.wp2-about__output {
    background: linear-gradient(180deg, #fafbff 0%, #ffffff 100%);
    border: 1px solid #e5e7eb;
    border-radius: .5rem;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    min-height: 22rem;
}

.wp2-output__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: .75rem;
    flex-wrap: wrap;
}
.wp2-output__title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    color: #0a58ca;
}
.wp2-output__actions {
    display: flex;
    gap: .375rem;
    flex-wrap: wrap;
}

.wp2-output__body {
    flex: 1;
    background: #fff;
    border: 1px dashed #d1d5db;
    border-radius: .375rem;
    padding: 1rem;
    font-size: .9375rem;
    line-height: 1.55;
    white-space: pre-wrap;
    color: #1f2937;
}
.wp2-output__body p {
    margin: 0 0 .75rem 0;
}
.wp2-output__body p:last-child { margin-bottom: 0; }

.wp2-output__placeholder {
    color: #6b7280;
    font-style: italic;
    margin: 0;
}

.wp2-output__meta {
    margin-top: .625rem;
    font-size: .8125rem;
    color: #6b7280;
    text-align: right;
}
.wp2-output__warning.is-error { color: #b91c1c; font-weight: 600; }

/* Style tabs */
.wp2-styles {
    display: flex;
    gap: .375rem;
    flex-wrap: wrap;
}
.wp2-style {
    flex: 1;
    min-width: 7rem;
    appearance: none;
    border: 1px solid #d1d5db;
    background: #fff;
    color: #374151;
    padding: .5rem .75rem;
    border-radius: .375rem;
    font-size: .875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s ease;
}
.wp2-style:hover {
    border-color: #9ca3af;
    background: #f9fafb;
}
.wp2-style.is-active {
    background: #0d6efd;
    border-color: #0d6efd;
    color: #fff;
}

/* ═══════════════════════════════════════════════════════════════════
   TIME-ZONE MEETING GRID
═══════════════════════════════════════════════════════════════════ */

.wp2-tzg {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.wp2-tzg__controls {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 1.25rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: .5rem;
    padding: 1.25rem;
}
@media (max-width: 860px) {
    .wp2-tzg__controls { grid-template-columns: 1fr; }
}

.wp2-tzg__cities { display: flex; flex-direction: column; gap: .5rem; }

.wp2-tzg__chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .375rem;
    min-height: 2.25rem;
    padding: .25rem 0;
}
.wp2-tzg__chip {
    background: #eef2ff;
    color: #3730a3;
    padding: .25rem .5rem .25rem .625rem;
    align-items: center;
}
.wp2-tzg__anchor-tag {
    background: #4f46e5;
    color: #fff;
    font-size: .65rem;
    text-transform: uppercase;
    padding: .125rem .375rem;
    border-radius: 4px;
    margin-right: .375rem;
    letter-spacing: .03em;
}
.wp2-tzg__chip-name { font-weight: 600; font-size: .875rem; }
.wp2-tzg__empty {
    color: #6b7280;
    font-style: italic;
    font-size: .875rem;
}

.wp2-tzg__search {
    position: relative;
}
.wp2-tzg__suggest {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 20;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: .375rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .08);
    max-height: 18rem;
    overflow-y: auto;
}
.wp2-tzg__suggest-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: transparent;
    border: 0;
    border-bottom: 1px solid #f3f4f6;
    padding: .5rem .75rem;
    text-align: left;
    cursor: pointer;
    gap: .5rem;
}
.wp2-tzg__suggest-item:hover:not(.is-disabled) {
    background: #eff6ff;
}
.wp2-tzg__suggest-item.is-disabled {
    opacity: .55;
    cursor: not-allowed;
}
.wp2-tzg__suggest-name { font-weight: 600; font-size: .875rem; color: #111827; }
.wp2-tzg__suggest-tz { font-size: .75rem; color: #6b7280; font-family: ui-monospace, "SF Mono", Menlo, monospace; }
.wp2-tzg__suggest-tag {
    font-size: .65rem;
    text-transform: uppercase;
    background: #d1fae5;
    color: #065f46;
    padding: .125rem .375rem;
    border-radius: 4px;
}
.wp2-tzg__suggest-empty {
    padding: .75rem;
    color: #6b7280;
    font-size: .875rem;
    text-align: center;
}

.wp2-tzg__opts {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}
.wp2-tzg__hours {
    display: flex;
    align-items: center;
    gap: .375rem;
}
.wp2-tzg__dash { color: #6b7280; font-size: .875rem; }

/* Banner */
.wp2-tzg__banner {
    border: 1px solid;
    border-radius: .5rem;
    padding: .75rem 1rem;
    font-size: .9375rem;
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
}
.wp2-tzg__banner i { font-size: 1.125rem; }
.wp2-tzg__banner.is-success {
    background: #ecfdf5;
    border-color: #6ee7b7;
    color: #065f46;
}
.wp2-tzg__banner.is-good {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1e40af;
}
.wp2-tzg__banner.is-warn {
    background: #fffbeb;
    border-color: #fcd34d;
    color: #92400e;
}

/* Empty state */
.wp2-tzg__empty-state {
    text-align: center;
    padding: 3rem 1rem;
    background: #f9fafb;
    border: 1px dashed #d1d5db;
    border-radius: .5rem;
    color: #6b7280;
}
.wp2-tzg__empty-state i {
    font-size: 2.25rem;
    color: #9ca3af;
    display: block;
    margin-bottom: .5rem;
}
.wp2-tzg__empty-state p { margin: 0; font-size: .9375rem; }

/* The grid */
.wp2-tzg__grid-wrap {
    overflow-x: auto;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: .5rem;
    padding: .75rem;
}

.wp2-tzg__grid {
    min-width: 56rem;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.wp2-tzg__head, .wp2-tzg__row {
    display: grid;
    grid-template-columns: 9rem 1fr;
    align-items: stretch;
    gap: .375rem;
}

.wp2-tzg__city-head {
    font-weight: 700;
    font-size: .8125rem;
    color: #4f46e5;
    padding: .375rem .5rem;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.wp2-tzg__city {
    padding: .5rem .5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-right: 2px solid #e5e7eb;
}
.wp2-tzg__city-name {
    font-weight: 600;
    font-size: .875rem;
    color: #111827;
}
.wp2-tzg__city-tz {
    font-size: .6875rem;
    color: #9ca3af;
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
}

.wp2-tzg__cells {
    display: grid;
    grid-template-columns: repeat(24, minmax(2.25rem, 1fr));
    gap: 2px;
}

.wp2-tzg__hour-head {
    appearance: none;
    border: 0;
    background: transparent;
    font-size: .6875rem;
    font-weight: 600;
    color: #6b7280;
    text-align: center;
    padding: .25rem 0;
    cursor: pointer;
    border-radius: 4px;
}
.wp2-tzg__hour-head:hover {
    background: #f3f4f6;
    color: #111827;
}
.wp2-tzg__hour-head.is-best-col {
    color: #065f46;
    font-weight: 700;
}

.wp2-tzg__cell {
    appearance: none;
    border: 1px solid transparent;
    background: #f3f4f6;
    color: #6b7280;
    font-size: .75rem;
    font-weight: 600;
    padding: .5rem .25rem;
    text-align: center;
    border-radius: 4px;
    cursor: pointer;
    font-variant-numeric: tabular-nums;
    transition: transform .1s ease, box-shadow .1s ease;
}
.wp2-tzg__cell.is-best {
    background: #d1fae5;
    color: #065f46;
    border-color: #6ee7b7;
}
.wp2-tzg__cell.is-good {
    background: #fef3c7;
    color: #92400e;
    border-color: #fcd34d;
}
.wp2-tzg__cell.is-ok {
    background: #f3f4f6;
    color: #4b5563;
}
.wp2-tzg__cell.is-night {
    background: #1f2937;
    color: #d1d5db;
    border-color: #374151;
}
.wp2-tzg__cell.is-best-col {
    box-shadow: 0 0 0 2px rgba(79, 70, 229, .35);
}
.wp2-tzg__cell:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, .08);
    border-color: #4f46e5;
}

/* Legend */
.wp2-tzg__legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: .75rem;
    color: #6b7280;
    padding: .25rem .25rem;
}
.wp2-tzg__legend-item {
    display: inline-flex;
    align-items: center;
    gap: .375rem;
}
.wp2-tzg__swatch {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    display: inline-block;
    border: 1px solid rgba(0, 0, 0, .08);
}
.wp2-tzg__swatch.is-best { background: #d1fae5; border-color: #6ee7b7; }
.wp2-tzg__swatch.is-good { background: #fef3c7; border-color: #fcd34d; }
.wp2-tzg__swatch.is-ok { background: #f3f4f6; }
.wp2-tzg__swatch.is-night { background: #1f2937; }

/* Mobile summary */
.wp2-tzg__summary { display: none; }

@media (max-width: 720px) {
    .wp2-tzg__grid-wrap { display: none; }
    .wp2-tzg__legend { display: none; }
    .wp2-tzg__summary {
        display: block;
        background: #fff;
        border: 1px solid #e5e7eb;
        border-radius: .5rem;
        padding: 1rem;
    }
}

.wp2-tzg__summary-title {
    font-size: .9375rem;
    font-weight: 700;
    color: #4f46e5;
    margin: 0 0 .75rem 0;
}

.wp2-tzg__summary-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: .375rem;
    padding: .75rem;
    margin-bottom: .625rem;
}
.wp2-tzg__summary-card:last-child { margin-bottom: 0; }
.wp2-tzg__summary-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: .8125rem;
    color: #6b7280;
    margin-bottom: .375rem;
}
.wp2-tzg__summary-head strong { color: #111827; font-size: .9375rem; }

.wp2-tzg__summary-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.wp2-tzg__summary-list li {
    display: flex;
    justify-content: space-between;
    padding: .25rem 0;
    font-size: .875rem;
    border-top: 1px dashed #e5e7eb;
}
.wp2-tzg__summary-list li:first-child { border-top: 0; }
.wp2-tzg__summary-list span { color: #4b5563; }
.wp2-tzg__summary-list strong { color: #111827; font-variant-numeric: tabular-nums; }
