/**
 * VIG1 Virtual Product Purchase Flow Styles
 */

/* ── Alertify z-index override — minden overlay/popup fölé kerüljön ─────── */
.alertify,
.alertify .ajs-dimmer,
.alertify .ajs-modal,
.alertify .ajs-dialog {
    z-index: 99999 !important;
}

/* ── Info badge (újrafelhasználható, pl. form label mellé) ───────────────── */
.vig1-info-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #2563eb;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    font-style: normal;
    line-height: 1;
    cursor: default;
    position: relative;
    vertical-align: middle;
    margin-left: 5px;
    flex-shrink: 0;
    user-select: none;
}

/* Tooltip szöveg */
.vig1-info-badge::after {
    content: attr(data-tooltip);
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    transform: none;
    background: #1e3a8a;
    color: #fff;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.45;
    padding: 7px 11px;
    border-radius: 7px;
    width: max-content;
    max-width: 260px;
    white-space: normal;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
    z-index: 10100;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

/* Tooltip nyíl */
.vig1-info-badge::before {
    content: '';
    position: absolute;
    top: calc(100% + 2px);
    left: 5px;
    transform: none;
    border: 5px solid transparent;
    border-bottom-color: #1e3a8a;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
    z-index: 10100;
}

.vig1-info-badge:hover::after,
.vig1-info-badge:focus::after,
.vig1-info-badge:hover::before,
.vig1-info-badge:focus::before {
    opacity: 1;
}

.vig1-vp-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vig1-vp-modal {
    background: white;
    border-radius: 14px;
    border: 1px solid #bfdbfe;
    box-shadow: 0 20px 40px rgba(37, 99, 235, 0.12), 0 8px 16px rgba(0, 0, 0, 0.08);
    width: min(560px, 92vw);
    max-height: 90vh;
    overflow-y: auto;
    padding: 0;
}

.vig1-vp-modal-content {
    padding: 24px;
}

.vig1-vp-modal-content h2 {
    margin: 0 0 20px 0;
    font-size: 20px;
    color: #1e40af;
    border-bottom: 2px solid #bfdbfe;
    padding-bottom: 12px;
}

.vig1-vp-modal-content h3 {
    font-size: 14px;
    color: #2563eb;
    margin: 16px 0 8px 0;
}

/* Profile Modal */
.vig1-vp-profile-info {
    background-color: #eff6ff;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 16px;
    border: 1px solid #bfdbfe;
}

.vig1-vp-profile-info p {
    margin: 8px 0;
    font-size: 14px;
}

.vig1-vp-wallet {
    background-color: #e8f5e9;
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 16px;
}

.vig1-vp-booking-hours {
    background-color: #eff6ff;
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 16px;
}
.vig1-vp-booking-hours h3 {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: #1d4ed8;
}
.vig1-vp-hours-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    border-bottom: 1px solid #bfdbfe;
    font-size: 13px;
}
.vig1-vp-hours-row:last-child {
    border-bottom: none;
}
.vig1-vp-hours-label {
    color: #374151;
}
.vig1-vp-hours-value {
    font-weight: 700;
    color: #1d4ed8;
}

#vig1-vp-wallet-content {
    font-size: 13px;
    margin: 8px 0;
}

.vig1-vp-wallet-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid #c8e6c9;
    font-size: 13px;
}
.vig1-vp-wallet-row:last-child {
    border-bottom: none;
}
.vig1-vp-wallet-name {
    font-weight: 600;
    color: #1f2937;
}
.vig1-vp-wallet-balance {
    color: #4f46e5;
    font-weight: 700;
}

/* Shop Modal */
.vig1-vp-shop {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

@media (max-width: 700px) {
    .vig1-vp-shop {
        grid-template-columns: 1fr;
    }
}

.vig1-vp-shop-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.vig1-vp-shop-form label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

.vig1-vp-shop-form select,
.vig1-vp-shop-form input[type="number"] {
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
}

.vig1-vp-products-loading {
    display: none;
    font-size: 12px;
    color: #555;
    background-color: #eef6ff;
    border: 1px solid #cfe6ff;
    border-radius: 4px;
    padding: 8px;
}

.vig1-vp-product-desc {
    font-size: 12px;
    color: #374151;
    background-color: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 4px;
    padding: 8px 10px;
    line-height: 1.5;
}

.vig1-vp-cart-preview {
    background-color: #f9f9f9;
    padding: 12px;
    border-radius: 4px;
    border: 1px solid #eee;
}

.vig1-vp-cart-preview h3 {
    margin-top: 0;
}

.vig1-vp-cart-items {
    font-size: 13px;
}

.vig1-vp-empty {
    color: #999;
    font-style: italic;
    margin: 8px 0;
}

.vig1-vp-cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 8px;
    background-color: white;
    border-radius: 6px;
    margin-bottom: 4px;
    border-left: 3px solid #2563eb;
}

.vig1-vp-cart-item > span:first-child {
    flex: 1;
    font-weight: 600;
}

/* Review Modal */
.vig1-vp-review-items {
    background-color: #f9f9f9;
    border-radius: 4px;
    padding: 12px;
    margin-bottom: 16px;
    max-height: 300px;
    overflow-y: auto;
}

.vig1-vp-review-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background-color: white;
    border-radius: 6px;
    margin-bottom: 6px;
    border-left: 3px solid #2563eb;
    font-size: 13px;
}

.vig1-vp-review-product {
    flex: 1;
    font-weight: 600;
}

.vig1-vp-review-qty {
    width: 80px;
    text-align: right;
    margin: 0 12px;
}

.vig1-vp-review-price {
    width: 120px;
    text-align: right;
    font-weight: 600;
}

.vig1-vp-btn-remove {
    padding: 4px 8px;
    background-color: #f44336;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
}

.vig1-vp-btn-remove:hover {
    background-color: #d32f2f;
}

.vig1-vp-review-total {
    background-color: #eff6ff;
    border: 1px solid #bfdbfe;
    padding: 12px;
    border-radius: 8px;
    text-align: right;
    font-size: 14px;
    margin-bottom: 16px;
}

/* Invoice Data Modal */
.vig1-vp-invoice-type {
    display: flex;
    gap: 20px;
    margin-bottom: 16px;
}

.vig1-vp-invoice-type label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    cursor: pointer;
}

.vig1-vp-invoice-type input[type="radio"] {
    cursor: pointer;
}

#vig1-vp-invoice-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.vig1-vp-form-group {
    display: flex;
    flex-direction: column;
}

.vig1-vp-form-group label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 4px;
}

.vig1-vp-form-group input {
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
}

.vig1-vp-form-group input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

/* Action Buttons */
.vig1-vp-modal-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.vig1-vp-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
}

.vig1-vp-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.vig1-vp-btn-primary {
    background-color: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
}

.vig1-vp-btn-primary:hover:not(:disabled) {
    background-color: #dbeafe;
    border-color: #93c5fd;
}

.vig1-vp-btn-secondary {
    background-color: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
}

.vig1-vp-btn-secondary:hover {
    background-color: #dbeafe;
}

.vig1-vp-btn-danger {
    background-color: #f44336;
    color: white;
}

.vig1-vp-btn-danger:hover {
    background-color: #d32f2f;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .vig1-vp-modal {
        width: 96vw;
    }

    .vig1-vp-modal-content {
        padding: 16px;
    }

    .vig1-vp-modal-actions {
        flex-direction: column;
    }

    .vig1-vp-btn {
        width: 100%;
        padding: 14px 20px;
    }

    .vig1-vp-review-item {
        flex-wrap: wrap;
    }
}
