/*
 * TI WooCommerce Wishlist – custom popup styles.
 * Replaces plugin's public.min.css and theme.min.css on all non-wishlist pages.
 */

/* ── Button reset (TI CSS normally adds conflicting margins / dimensions) ─── */

a.tinvwl_add_to_wishlist_button {
    margin: 0 !important;
    padding: 0 !important;
}

/* ── Wrapper appended to <body> by TI's JS ───────────────────────────────── */

.tinv-wishlist {
    font-family: inherit;
}

/* ── Modal container ─────────────────────────────────────────────────────── */

.tinv-wishlist .tinv-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    overflow: hidden;
    visibility: hidden;
    opacity: 0;
    z-index: 999999;
    outline: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.tinv-wishlist .tinv-modal.tinv-modal-open {
    width: 100%;
    height: 100%;
    overflow-y: auto;
    visibility: visible;
    opacity: 1;
}

/* ── Backdrop ────────────────────────────────────────────────────────────── */

.tinv-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(25, 25, 25, 0.6);
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.tinv-modal.tinv-modal-open .tinv-overlay {
    visibility: visible;
    opacity: 1;
}

/* ── Table / cell centering ──────────────────────────────────────────────── */

.tinv-table {
    display: table;
    width: 100%;
    min-height: 100%;
    position: relative;
    z-index: 1;
}

.tinv-cell {
    display: table-cell;
    vertical-align: middle;
    text-align: center;
    padding: 20px;
}

/* ── Dialog box ──────────────────────────────────────────────────────────── */

.tinv-modal-inner {
    position: relative;
    display: inline-block;
    width: 100%;
    max-width: 360px;
    background: #fff;
    border-radius: 8px;
    padding: 32px 24px 24px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

/* Close (X) button */
.tinv-close-modal {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #F6F6F6;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
    color: #4C4C4D;
    line-height: 1;
    transition: background 0.2s;
}

.tinv-close-modal:hover {
    background: #E6E6E6;
}

/* ── Icon (TI's webfont icon – hidden since we don't load the font) ───────── */

.tinv-modal-inner > i,
.tinv-modal-inner .tinvwl-icon {
    display: none;
}

/* ── Message text ────────────────────────────────────────────────────────── */

.tinv-txt {
    font-size: 16px;
    font-weight: 600;
    color: #323232;
    line-height: 1.5;
    margin: 0 0 4px;
}

.tinv-txt p {
    margin: 0;
}

.tinv-modal-inner .already-in {
    font-size: 14px;
    color: #4C4C4D;
    margin: 0 0 16px;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */

.tinvwl-buttons-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 20px;
}

.tinvwl-buttons-group .button,
.tinv-wishlist .tinv-modal button.button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0 6px;
    width: 100%;
    height: 48px;
    padding: 0 24px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 8px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    margin: 0 !important;
}

/* Primary – view wishlist */
.tinvwl-buttons-group .tinvwl_button_view,
.tinv-wishlist .tinv-modal .tinvwl_button_view {
    background-color: #005CA9;
    border-color: #005CA9;
    color: #fff;
}

.tinvwl-buttons-group .tinvwl_button_view:hover {
    background-color: #004a87;
    border-color: #004a87;
    color: #fff;
}

/* Secondary – close */
.tinvwl-buttons-group .tinvwl_button_close,
.tinv-wishlist .tinv-modal .tinvwl_button_close {
    background-color: transparent;
    border-color: #005CA9;
    color: #005CA9;
}

.tinvwl-buttons-group .tinvwl_button_close:hover {
    background-color: #005CA9;
    color: #fff;
}

/* Hide TI's button icon glyphs (webfont not loaded) */
.tinvwl-buttons-group .button i,
.tinv-wishlist .tinv-modal button.button i {
    display: none;
}

/* ── "Create new list" form inside modal ─────────────────────────────────── */

.tinv-wishlist .tinv-modal input[type="text"],
.tinv-wishlist .tinv-modal select {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #E6E6E6;
    border-radius: 8px;
    font-size: 14px;
    color: #323232;
    background: #fff;
    box-shadow: none;
    outline: none;
    margin: 8px 0 0;
}

.tinv-wishlist .tinv-modal label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #323232;
    text-align: left;
    margin-top: 12px;
}

.tinv-wishlist .tinv-modal ul {
    list-style: none;
    margin: 12px 0 0;
    padding: 0;
    text-align: left;
}

.tinv-wishlist .tinv-modal ul li {
    list-style: none;
    padding: 6px 0;
    font-size: 14px;
    color: #323232;
}