/* WP Tooltips Pro - Popup Blocks Styles */

.wtp-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999998;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.wtp-popup-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.wtp-popup-block {
    position: fixed;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    z-index: 999999;
    opacity: 0;
    transform: scale(0.95);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: auto;
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    font-family: var(--wtp-popup-font-family, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
    font-size: var(--wtp-popup-font-size, 14px);
    font-weight: var(--wtp-popup-font-weight, normal);
    line-height: var(--wtp-popup-line-height, 1.6);
}

/* Специфичные стили для индивидуальных попапов */
.wtp-popup-block[data-popup-id] {
    font-family: inherit !important;
    /* ИСПРАВЛЕНО: Убираем жестко заданный размер шрифта */
    /* font-size: 14px !important; */
    font-weight: normal !important;
    line-height: 1.6 !important;
}

/* КРИТИЧЕСКОЕ ИСПРАВЛЕНИЕ: Наследование цветов для внутренних элементов */
.wtp-popup-block[data-popup-id] .wtp-popup-content,
.wtp-popup-block[data-popup-id] .wtp-popup-body,
.wtp-popup-block[data-popup-id] .wtp-popup-header,
.wtp-popup-block[data-popup-id] .wtp-popup-title,
.wtp-popup-block[data-popup-id] p,
.wtp-popup-block[data-popup-id] div,
.wtp-popup-block[data-popup-id] span {
    color: inherit !important;
}

.wtp-popup-block.show {
    opacity: 1;
    transform: scale(1);
}

/* 🎨 ШАБЛОНЫ ДИЗАЙНА ВСПЛЫВАЮЩИХ БЛОКОВ */

/* 🎨 default - Стандартный (классический дизайн) */
.wtp-popup-block.template-default {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    color: #333333;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    transition: all 0.3s ease;
}

.wtp-popup-block.template-default:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.wtp-popup-block.template-default .wtp-popup-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px 8px 0 0;
    padding: 16px 20px;
    border-bottom: none;
}

.wtp-popup-block.template-default .wtp-popup-title {
    color: white;
    font-weight: 600;
    font-size: 18px;
    margin: 0;
    line-height: 1.4;
}

.wtp-popup-block.template-default .wtp-popup-body {
    padding: 20px;
    line-height: 1.6;
    color: #495057;
}

.wtp-popup-block.template-default .wtp-popup-close {
    color: white;
    opacity: 0.8;
    transition: all 0.2s ease;
    font-size: 18px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.wtp-popup-block.template-default .wtp-popup-close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

/* ✨ modern - Современный (минималистичный с тенями) */
.wtp-popup-block.template-modern {
    background: #ffffff;
    border: none;
    border-radius: 16px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(255, 255, 255, 0.05);
    color: #1a1a1a;
    backdrop-filter: blur(10px);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.wtp-popup-block.template-modern:hover {
    box-shadow: 0 35px 100px rgba(0, 0, 0, 0.2);
    transform: translateY(-4px);
}

.wtp-popup-block.template-modern .wtp-popup-header {
    background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
    color: white;
    border-radius: 16px 16px 0 0;
    padding: 20px 24px;
    border-bottom: none;
}

.wtp-popup-block.template-modern .wtp-popup-title {
    color: white;
    font-weight: 300;
    font-size: 20px;
    letter-spacing: 0.5px;
    margin: 0;
    line-height: 1.3;
}

.wtp-popup-block.template-modern .wtp-popup-body {
    padding: 24px;
    line-height: 1.7;
    color: #2c3e50;
    font-size: 15px;
}

.wtp-popup-block.template-modern .wtp-popup-close {
    color: white;
    opacity: 0.7;
    transition: all 0.3s ease;
    font-size: 18px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

.wtp-popup-block.template-modern .wtp-popup-close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

/* 🔔 notification - Уведомление (стиль системного уведомления) */
.wtp-popup-block.template-notification {
    background: #ffffff;
    border: 1px solid #e3f2fd;
    border-left: 4px solid #2196f3;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.1);
    color: #1565c0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    transition: all 0.3s ease;
}

.wtp-popup-block.template-notification:hover {
    box-shadow: 0 4px 16px rgba(33, 150, 243, 0.2);
    border-left-color: #1976d2;
}

.wtp-popup-block.template-notification .wtp-popup-header {
    background: linear-gradient(135deg, #a29bfe 0%, #6c5ce7 100%);
    color: white;
    padding: 12px 16px;
    border-radius: 4px 4px 0 0;
    border-bottom: none;
}

.wtp-popup-block.template-notification .wtp-popup-title {
    color: white;
    font-weight: 500;
    font-size: 16px;
    display: flex;
    align-items: center;
    margin: 0;
    line-height: 1.4;
}

.wtp-popup-block.template-notification .wtp-popup-title:before {
    content: "🔔";
    margin-right: 8px;
    font-size: 14px;
}

.wtp-popup-block.template-notification .wtp-popup-body {
    padding: 16px;
    background: #f8f9ff;
    color: #37474f;
    line-height: 1.6;
}

.wtp-popup-block.template-notification .wtp-popup-close {
    color: white;
    opacity: 0.8;
    transition: all 0.2s ease;
    font-size: 16px;
    width: 28px;
    height: 28px;
    border-radius: 4px;
}

.wtp-popup-block.template-notification .wtp-popup-close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
}

/* 🃏 card - Карточка (дизайн с границами) */
.wtp-popup-block.template-card {
    background: #ffffff;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    color: #2c3e50;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    transition: all 0.3s ease;
}

.wtp-popup-block.template-card:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
    border-color: #fd79a8;
    transform: translateY(-2px);
}

.wtp-popup-block.template-card .wtp-popup-header {
    background: linear-gradient(135deg, #fd79a8 0%, #e84393 100%);
    color: white;
    border-bottom: 2px solid #e84393;
    padding: 16px 20px;
    border-radius: 0;
}

.wtp-popup-block.template-card .wtp-popup-title {
    color: white;
    font-weight: 600;
    font-size: 18px;
    margin: 0;
    line-height: 1.4;
}

.wtp-popup-block.template-card .wtp-popup-body {
    padding: 20px;
    border-left: 4px solid #fd79a8;
    border-right: 4px solid #fd79a8;
    background: #fafafa;
    line-height: 1.6;
    color: #37474f;
}

.wtp-popup-block.template-card .wtp-popup-actions {
    background: #f8f9fa;
    border-top: 2px solid #e1e5e9;
    padding: 16px 20px;
    border-radius: 0 0 12px 12px;
}

.wtp-popup-block.template-card .wtp-popup-close {
    color: white;
    opacity: 0.8;
    transition: all 0.2s ease;
    font-size: 16px;
    width: 30px;
    height: 30px;
    border-radius: 6px;
}

.wtp-popup-block.template-card .wtp-popup-close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
}

/* 🎯 promo - Промо (яркий дизайн для акций) */
.wtp-popup-block.template-promo {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    border: 3px solid #ff9ff3;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(255, 107, 107, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1);
    color: white;
    position: relative;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    transition: all 0.4s ease;
}

.wtp-popup-block.template-promo:hover {
    box-shadow: 0 20px 50px rgba(255, 107, 107, 0.4);
    transform: translateY(-3px) scale(1.02);
}

.wtp-popup-block.template-promo:before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: promoShine 3s infinite;
}

@keyframes promoShine {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.wtp-popup-block.template-promo .wtp-popup-header {
    background: linear-gradient(135deg, #fdcb6e 0%, #e17055 100%);
    color: white;
    padding: 20px 24px;
    border-radius: 20px 20px 0 0;
    position: relative;
    z-index: 1;
    border-bottom: none;
}

.wtp-popup-block.template-promo .wtp-popup-title {
    color: white;
    font-weight: 700;
    font-size: 22px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
    line-height: 1.3;
}

.wtp-popup-block.template-promo .wtp-popup-title:before {
    content: "🎯";
    margin-right: 8px;
    font-size: 20px;
}

.wtp-popup-block.template-promo .wtp-popup-body {
    padding: 24px;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
    line-height: 1.6;
    font-size: 16px;
}

.wtp-popup-block.template-promo .wtp-popup-close {
    color: white;
    opacity: 0.9;
    font-weight: bold;
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
    font-size: 18px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

.wtp-popup-block.template-promo .wtp-popup-close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* 💎 elegant - Элегантный (изысканный премиум дизайн) */
.wtp-popup-block.template-elegant {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    border: 1px solid #34495e;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(44, 62, 80, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    color: #ecf0f1;
    position: relative;
    overflow: hidden;
    font-family: 'Georgia', serif;
    transition: all 0.4s ease;
}

.wtp-popup-block.template-elegant:hover {
    box-shadow: 0 30px 80px rgba(44, 62, 80, 0.6);
    transform: translateY(-4px);
}

.wtp-popup-block.template-elegant:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #f39c12, #e74c3c, #9b59b6, #3498db, #2ecc71);
    animation: elegantShine 4s infinite;
}

@keyframes elegantShine {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.wtp-popup-block.template-elegant .wtp-popup-header {
    background: linear-gradient(135deg, #2d3436 0%, #636e72 100%);
    color: #ddd;
    padding: 20px 24px;
    border-bottom: 1px solid #34495e;
    border-radius: 0;
}

.wtp-popup-block.template-elegant .wtp-popup-title {
    color: #ecf0f1;
    font-weight: 300;
    font-size: 20px;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin: 0;
    line-height: 1.3;
}

.wtp-popup-block.template-elegant .wtp-popup-title:before {
    content: "💎";
    margin-right: 12px;
    font-size: 18px;
}

.wtp-popup-block.template-elegant .wtp-popup-body {
    padding: 24px;
    line-height: 1.8;
    font-size: 15px;
    color: #bdc3c7;
}

.wtp-popup-block.template-elegant .wtp-popup-close {
    color: #bdc3c7;
    opacity: 0.7;
    transition: all 0.3s ease;
    font-size: 16px;
    width: 32px;
    height: 32px;
    border-radius: 4px;
}

.wtp-popup-block.template-elegant .wtp-popup-close:hover {
    opacity: 1;
    color: #ecf0f1;
    background: rgba(255, 255, 255, 0.1);
}

/* 🪟 glass - Стеклянный (эффект матового стекла) */
.wtp-popup-block.template-glass {
    background: rgba(255, 255, 255, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px) saturate(180%);
    -webkit-backdrop-filter: blur(10px) saturate(180%);
    color: #2c3e50;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    transition: all 0.4s ease;
}

.wtp-popup-block.template-glass:hover {
    background: rgba(255, 255, 255, 0.35);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.wtp-popup-block.template-glass .wtp-popup-header {
    background: rgba(255, 255, 255, 0.2);
    color: #2c3e50;
    padding: 18px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px 16px 0 0;
}

.wtp-popup-block.template-glass .wtp-popup-title {
    color: #2c3e50;
    font-weight: 600;
    font-size: 18px;
    margin: 0;
    line-height: 1.4;
}

.wtp-popup-block.template-glass .wtp-popup-body {
    padding: 22px;
    line-height: 1.6;
    color: #37474f;
}

.wtp-popup-block.template-glass .wtp-popup-close {
    color: #2c3e50;
    opacity: 0.7;
    transition: all 0.3s ease;
    font-size: 16px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

.wtp-popup-block.template-glass .wtp-popup-close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* ⚡ neon - Неоновый (яркий дизайн с подсветкой) */
.wtp-popup-block.template-neon {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    border: 2px solid #00ffff;
    border-radius: 12px;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.3), inset 0 0 30px rgba(0, 255, 255, 0.1);
    color: #00ffff;
    font-family: 'Courier New', monospace;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
}

.wtp-popup-block.template-neon:hover {
    box-shadow: 0 0 50px rgba(0, 255, 255, 0.5), inset 0 0 50px rgba(0, 255, 255, 0.2);
    border-color: #ff00ff;
    transform: translateY(-3px);
}

.wtp-popup-block.template-neon:before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 255, 0.2), transparent);
    animation: neonScan 2s infinite;
}

@keyframes neonScan {
    0% { left: -100%; }
    100% { left: 100%; }
}

@keyframes neonPulse {
    0%, 100% { 
        box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
    }
    50% { 
        box-shadow: 0 0 40px rgba(0, 255, 255, 0.6), 0 0 60px rgba(255, 0, 255, 0.3);
    }
}

.wtp-popup-block.template-neon .wtp-popup-header {
    background: linear-gradient(135deg, #ff006e 0%, #8338ec 100%);
    color: #00ffff;
    padding: 16px 20px;
    border-bottom: 2px solid #00ffff;
    border-radius: 0;
    text-shadow: 0 0 10px currentColor;
}

.wtp-popup-block.template-neon .wtp-popup-title {
    color: #00ffff;
    font-weight: 700;
    font-size: 18px;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 0;
    line-height: 1.3;
    text-shadow: 0 0 15px currentColor;
}

.wtp-popup-block.template-neon .wtp-popup-body {
    padding: 20px;
    line-height: 1.6;
    color: #ffffff;
    font-size: 14px;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

.wtp-popup-block.template-neon .wtp-popup-close {
    color: #00ffff;
    opacity: 0.8;
    transition: all 0.3s ease;
    font-size: 16px;
    width: 32px;
    height: 32px;
    border-radius: 4px;
    border: 1px solid #00ffff;
    text-shadow: 0 0 10px currentColor;
}

.wtp-popup-block.template-neon .wtp-popup-close:hover {
    opacity: 1;
    background: rgba(0, 255, 255, 0.1);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
    transform: scale(1.1);
}

/* 🌈 gradient - Градиентный (многоцветный) */
.wtp-popup-block.template-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #f5576c 75%, #4facfe 100%);
    border: none;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(102, 126, 234, 0.3);
    color: white;
    position: relative;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    transition: all 0.4s ease;
}

.wtp-popup-block.template-gradient:hover {
    box-shadow: 0 30px 70px rgba(102, 126, 234, 0.4);
    transform: translateY(-4px) scale(1.02);
}

.wtp-popup-block.template-gradient::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: gradientShine 4s infinite;
}

@keyframes gradientShine {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.wtp-popup-block.template-gradient .wtp-popup-header {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px 20px 0 0;
    backdrop-filter: blur(10px);
}

.wtp-popup-block.template-gradient .wtp-popup-title {
    color: white;
    font-weight: 600;
    font-size: 20px;
    margin: 0;
    line-height: 1.3;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.wtp-popup-block.template-gradient .wtp-popup-body {
    padding: 24px;
    line-height: 1.6;
    color: white;
    font-size: 15px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.wtp-popup-block.template-gradient .wtp-popup-close {
    color: white;
    opacity: 0.8;
    transition: all 0.3s ease;
    font-size: 18px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

.wtp-popup-block.template-gradient .wtp-popup-close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* ⚪ minimal - Минимальный (ультра-минималистичный) */
.wtp-popup-block.template-minimal {
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    color: #212529;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    transition: all 0.2s ease;
}

.wtp-popup-block.template-minimal:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    border-color: #ced4da;
}

.wtp-popup-block.template-minimal .wtp-popup-header {
    background: #f8f9fa;
    color: #495057;
    padding: 12px 16px;
    border-bottom: 1px solid #e9ecef;
    border-radius: 4px 4px 0 0;
}

.wtp-popup-block.template-minimal .wtp-popup-title {
    color: #495057;
    font-weight: 500;
    font-size: 16px;
    margin: 0;
    line-height: 1.4;
}

.wtp-popup-block.template-minimal .wtp-popup-body {
    padding: 16px;
    line-height: 1.5;
    color: #6c757d;
    font-size: 14px;
}

.wtp-popup-block.template-minimal .wtp-popup-close {
    color: #6c757d;
    opacity: 0.7;
    transition: all 0.2s ease;
    font-size: 14px;
    width: 24px;
    height: 24px;
    border-radius: 2px;
}

.wtp-popup-block.template-minimal .wtp-popup-close:hover {
    opacity: 1;
    color: #495057;
    background: rgba(0, 0, 0, 0.05);
}

.wtp-popup-block.template-minimal .wtp-popup-actions {
    background: #ffffff;
    border-top: 1px solid #e9ecef;
    padding: 12px 16px;
    border-radius: 0 0 4px 4px;
}

/* 📱 МОБИЛЬНАЯ АДАПТАЦИЯ ДЛЯ ВСЕХ ШАБЛОНОВ */
@media screen and (max-width: 768px) {
    .wtp-popup-block.template-default,
    .wtp-popup-block.template-modern,
    .wtp-popup-block.template-notification,
    .wtp-popup-block.template-card,
    .wtp-popup-block.template-promo,
    .wtp-popup-block.template-elegant,
    .wtp-popup-block.template-glass,
    .wtp-popup-block.template-neon,
    .wtp-popup-block.template-gradient,
    .wtp-popup-block.template-minimal {
        max-width: 95vw;
        margin: 10px;
        border-radius: 12px;
    }
    
    .wtp-popup-block.template-default .wtp-popup-header,
    .wtp-popup-block.template-modern .wtp-popup-header,
    .wtp-popup-block.template-notification .wtp-popup-header,
    .wtp-popup-block.template-card .wtp-popup-header,
    .wtp-popup-block.template-promo .wtp-popup-header,
    .wtp-popup-block.template-elegant .wtp-popup-header,
    .wtp-popup-block.template-glass .wtp-popup-header,
    .wtp-popup-block.template-neon .wtp-popup-header,
    .wtp-popup-block.template-gradient .wtp-popup-header,
    .wtp-popup-block.template-minimal .wtp-popup-header {
        padding: 14px 16px;
        border-radius: 12px 12px 0 0;
    }
    
    .wtp-popup-block.template-default .wtp-popup-title,
    .wtp-popup-block.template-modern .wtp-popup-title,
    .wtp-popup-block.template-notification .wtp-popup-title,
    .wtp-popup-block.template-card .wtp-popup-title,
    .wtp-popup-block.template-promo .wtp-popup-title,
    .wtp-popup-block.template-elegant .wtp-popup-title,
    .wtp-popup-block.template-glass .wtp-popup-title,
    .wtp-popup-block.template-neon .wtp-popup-title,
    .wtp-popup-block.template-gradient .wtp-popup-title,
    .wtp-popup-block.template-minimal .wtp-popup-title {
        font-size: 16px;
    }
    
    .wtp-popup-block.template-default .wtp-popup-body,
    .wtp-popup-block.template-modern .wtp-popup-body,
    .wtp-popup-block.template-notification .wtp-popup-body,
    .wtp-popup-block.template-card .wtp-popup-body,
    .wtp-popup-block.template-promo .wtp-popup-body,
    .wtp-popup-block.template-elegant .wtp-popup-body,
    .wtp-popup-block.template-glass .wtp-popup-body,
    .wtp-popup-block.template-neon .wtp-popup-body,
    .wtp-popup-block.template-gradient .wtp-popup-body,
    .wtp-popup-block.template-minimal .wtp-popup-body {
        padding: 16px;
        font-size: 14px;
    }
    
    .wtp-popup-block.template-default .wtp-popup-close,
    .wtp-popup-block.template-modern .wtp-popup-close,
    .wtp-popup-block.template-notification .wtp-popup-close,
    .wtp-popup-block.template-card .wtp-popup-close,
    .wtp-popup-block.template-promo .wtp-popup-close,
    .wtp-popup-block.template-elegant .wtp-popup-close,
    .wtp-popup-block.template-glass .wtp-popup-close,
    .wtp-popup-block.template-neon .wtp-popup-close,
    .wtp-popup-block.template-gradient .wtp-popup-close,
    .wtp-popup-block.template-minimal .wtp-popup-close {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
    
    /* Специальные адаптации для отдельных шаблонов */
    .wtp-popup-block.template-promo .wtp-popup-title {
        font-size: 18px;
        letter-spacing: 0.5px;
    }
    
    .wtp-popup-block.template-elegant .wtp-popup-title {
        font-size: 17px;
        letter-spacing: 1px;
    }
    
    .wtp-popup-block.template-neon .wtp-popup-title {
        font-size: 16px;
        letter-spacing: 1px;
    }
    
    .wtp-popup-block.template-gradient .wtp-popup-header,
    .wtp-popup-block.template-promo .wtp-popup-header {
        border-radius: 12px 12px 0 0;
    }
}

/* 📱 ДОПОЛНИТЕЛЬНАЯ МОБИЛЬНАЯ АДАПТАЦИЯ ДЛЯ МАЛЕНЬКИХ ЭКРАНОВ */
@media screen and (max-width: 480px) {
    .wtp-popup-block.template-default,
    .wtp-popup-block.template-modern,
    .wtp-popup-block.template-notification,
    .wtp-popup-block.template-card,
    .wtp-popup-block.template-promo,
    .wtp-popup-block.template-elegant,
    .wtp-popup-block.template-glass,
    .wtp-popup-block.template-neon,
    .wtp-popup-block.template-gradient,
    .wtp-popup-block.template-minimal {
        max-width: 100vw;
        margin: 5px;
        border-radius: 8px;
    }
    
    .wtp-popup-block.template-default .wtp-popup-header,
    .wtp-popup-block.template-modern .wtp-popup-header,
    .wtp-popup-block.template-notification .wtp-popup-header,
    .wtp-popup-block.template-card .wtp-popup-header,
    .wtp-popup-block.template-promo .wtp-popup-header,
    .wtp-popup-block.template-elegant .wtp-popup-header,
    .wtp-popup-block.template-glass .wtp-popup-header,
    .wtp-popup-block.template-neon .wtp-popup-header,
    .wtp-popup-block.template-gradient .wtp-popup-header,
    .wtp-popup-block.template-minimal .wtp-popup-header {
        padding: 12px 14px;
        border-radius: 8px 8px 0 0;
    }
    
    .wtp-popup-block.template-default .wtp-popup-body,
    .wtp-popup-block.template-modern .wtp-popup-body,
    .wtp-popup-block.template-notification .wtp-popup-body,
    .wtp-popup-block.template-card .wtp-popup-body,
    .wtp-popup-block.template-promo .wtp-popup-body,
    .wtp-popup-block.template-elegant .wtp-popup-body,
    .wtp-popup-block.template-glass .wtp-popup-body,
    .wtp-popup-block.template-neon .wtp-popup-body,
    .wtp-popup-block.template-gradient .wtp-popup-body,
    .wtp-popup-block.template-minimal .wtp-popup-body {
        padding: 14px;
        font-size: 13px;
    }
}

/* 🔥 КРИТИЧЕСКИЕ СТИЛИ КНОПОК ДЕЙСТВИЙ - УНИВЕРСАЛЬНЫЕ ДЛЯ ВСЕХ ШАБЛОНОВ */

/* Базовые стили для всех кнопок WTP */
.wtp-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    border: none !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
    text-align: center !important;
    box-sizing: border-box !important;
    white-space: nowrap !important;
    line-height: 1.4 !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    
    /* Сброс стилей темы */
    margin: 0 !important;
    padding: 12px 24px !important;
    font-size: 14px !important;
    min-width: 100px !important;
    height: auto !important;
    max-width: none !important;
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    float: none !important;
    clear: none !important;
    overflow: visible !important;
    vertical-align: baseline !important;
    word-wrap: normal !important;
    text-transform: none !important;
    text-indent: 0 !important;
    font-style: normal !important;
    font-variant: normal !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-image: none !important;
    text-shadow: none !important;
    outline: none !important;
    box-shadow: none !important;
}

.wtp-button:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 8px rgba(0, 115, 170, 0.3) !important;
    background: #005a87 !important;
}

.wtp-button:active {
    transform: translateY(1px) !important;
}

/* 🎨 ЦВЕТОВЫЕ СХЕМЫ КНОПОК */

/* Primary - Синий (по умолчанию) */
.wtp-button.primary {
    background-color: #0073aa !important;
    color: #ffffff !important;
    border: 2px solid #0073aa !important;
}

.wtp-button.primary:hover {
    background-color: #005a87 !important;
    border-color: #005a87 !important;
    transform: translateY(-1px) !important;
}

/* Secondary - Серый */
.wtp-button.secondary {
    background-color: #6c757d !important;
    color: #ffffff !important;
    border: 2px solid #6c757d !important;
}

.wtp-button.secondary:hover {
    background-color: #5a6268 !important;
    border-color: #5a6268 !important;
    transform: translateY(-1px) !important;
}

/* Success - Зеленый */
.wtp-button.success {
    background-color: #28a745 !important;
    color: #ffffff !important;
    border: 2px solid #28a745 !important;
}

.wtp-button.success:hover {
    background-color: #218838 !important;
    border-color: #218838 !important;
    transform: translateY(-1px) !important;
}

/* Warning - Желтый */
.wtp-button.warning {
    background-color: #ffc107 !important;
    color: #212529 !important;
    border: 2px solid #ffc107 !important;
}

.wtp-button.warning:hover {
    background-color: #e0a800 !important;
    border-color: #e0a800 !important;
    transform: translateY(-1px) !important;
}

/* Danger - Красный */
.wtp-button.danger {
    background-color: #dc3545 !important;
    color: #ffffff !important;
    border: 2px solid #dc3545 !important;
}

.wtp-button.danger:hover {
    background-color: #c82333 !important;
    border-color: #c82333 !important;
    transform: translateY(-1px) !important;
}

/* Shadow Lift - Градиентный */
.wtp-button.shadow-lift {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: #ffffff !important;
    border: 2px solid transparent !important;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4) !important;
}

.wtp-button.shadow-lift:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6) !important;
}

/* 📏 РАЗМЕРЫ КНОПОК */

/* Маленький размер */
.wtp-button.size-small {
    padding: 8px 16px !important;
    font-size: 12px !important;
    border-radius: 4px !important;
}

/* Средний размер (по умолчанию) */
.wtp-button.size-medium {
    padding: 12px 24px !important;
    font-size: 14px !important;
    border-radius: 6px !important;
}

/* Большой размер */
.wtp-button.size-large {
    padding: 16px 32px !important;
    font-size: 16px !important;
    border-radius: 8px !important;
}

/* 🎯 СПЕЦИАЛЬНЫЕ СТИЛИ ДЛЯ КОНТЕЙНЕРОВ КНОПОК */

.wtp-popup-actions {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    margin-top: 16px !important;
    padding: 0 !important;
    flex-wrap: wrap !important;
}

.wtp-popup-actions.center {
    justify-content: center !important;
}

.wtp-popup-actions.right {
    justify-content: flex-end !important;
}

/* 📱 МОБИЛЬНАЯ АДАПТАЦИЯ КНОПОК */
@media screen and (max-width: 768px) {
    .wtp-button {
        padding: 10px 20px !important;
        font-size: 13px !important;
        margin: 0 4px 4px 0 !important;
    }
    
    .wtp-button.size-small {
        padding: 6px 12px !important;
        font-size: 11px !important;
    }
    
    .wtp-button.size-medium {
        padding: 10px 20px !important;
        font-size: 13px !important;
    }
    
    .wtp-button.size-large {
        padding: 12px 24px !important;
        font-size: 14px !important;
    }
    
    .wtp-popup-actions {
        gap: 4px !important;
        margin-top: 12px !important;
    }
}

@media screen and (max-width: 480px) {
    .wtp-button {
        padding: 8px 16px !important;
        font-size: 12px !important;
        margin: 0 2px 2px 0 !important;
    }
    
    .wtp-popup-actions {
        gap: 2px !important;
        margin-top: 8px !important;
    }
}

/* 🛡️ ЗАЩИТА ОТ ПЕРЕОПРЕДЕЛЕНИЯ ТЕМАМИ WORDPRESS */

/* Сброс стилей от тем WordPress */
.wtp-popup-block .wtp-button,
.wtp-popup-block .wtp-button:link,
.wtp-popup-block .wtp-button:visited,
.wtp-popup-block .wtp-button:focus,
.wtp-popup-block .wtp-button:active {
    all: unset !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    padding: 12px 24px !important;
    margin: 0 8px 8px 0 !important;
    border: none !important;
    border-radius: 6px !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    line-height: 1.2 !important;
    text-decoration: none !important;
    text-align: center !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-sizing: border-box !important;
    white-space: nowrap !important;
    user-select: none !important;
    outline: none !important;
    background: #0073aa !important;
    color: #ffffff !important;
    box-shadow: 0 2px 4px rgba(0, 115, 170, 0.2) !important;
}

/* Переопределение для всех состояний кнопок */
.wtp-popup-block .wtp-button.primary,
.wtp-popup-block .wtp-button.primary:link,
.wtp-popup-block .wtp-button.primary:visited {
    background: #0073aa !important;
    color: #ffffff !important;
}

.wtp-popup-block .wtp-button.success,
.wtp-popup-block .wtp-button.success:link,
.wtp-popup-block .wtp-button.success:visited {
    background: #28a745 !important;
    color: #ffffff !important;
}

.wtp-popup-block .wtp-button.danger,
.wtp-popup-block .wtp-button.danger:link,
.wtp-popup-block .wtp-button.danger:visited {
    background: #dc3545 !important;
    color: #ffffff !important;
}

.wtp-popup-block .wtp-button.secondary,
.wtp-popup-block .wtp-button.secondary:link,
.wtp-popup-block .wtp-button.secondary:visited {
    background: #6c757d !important;
    color: #ffffff !important;
}

.wtp-popup-block .wtp-button.warning,
.wtp-popup-block .wtp-button.warning:link,
.wtp-popup-block .wtp-button.warning:visited {
    background: #ffc107 !important;
    color: #212529 !important;
}

.wtp-popup-block .wtp-button.shadow-lift,
.wtp-popup-block .wtp-button.shadow-lift:link,
.wtp-popup-block .wtp-button.shadow-lift:visited {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: #ffffff !important;
}

/* 🔧 ДОПОЛНИТЕЛЬНЫЕ УТИЛИТЫ */

/* Полная ширина для кнопок */
.wtp-button.full-width {
    width: 100% !important;
    justify-content: center !important;
}

/* Отключенные кнопки */
.wtp-button:disabled,
.wtp-button.disabled {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}

/* Загрузка кнопок */
.wtp-button.loading {
    opacity: 0.7 !important;
    cursor: wait !important;
}

.wtp-button.loading:before {
    content: "" !important;
    width: 14px !important;
    height: 14px !important;
    border: 2px solid transparent !important;
    border-top: 2px solid currentColor !important;
    border-radius: 50% !important;
    animation: wtp-button-spin 1s linear infinite !important;
    margin-right: 8px !important;
}

@keyframes wtp-button-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 🎨 ИКОНКИ В КНОПКАХ */
.wtp-button .wtp-icon {
    width: 16px !important;
    height: 16px !important;
    display: inline-block !important;
    vertical-align: middle !important;
    flex-shrink: 0 !important;
}

.wtp-button.size-small .wtp-icon {
    width: 12px !important;
    height: 12px !important;
}

.wtp-button.size-large .wtp-icon {
    width: 18px !important;
    height: 18px !important;
}

/* Базовые стили кнопок */
.wtp-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    border: none !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
    text-align: center !important;
    box-sizing: border-box !important;
    white-space: nowrap !important;
    line-height: 1.4 !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    
    /* Сброс стилей темы */
    margin: 0 !important;
    padding: 12px 24px !important;
    font-size: 14px !important;
    min-width: 100px !important;
    height: auto !important;
    max-width: none !important;
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    float: none !important;
    clear: none !important;
    overflow: visible !important;
    vertical-align: baseline !important;
    word-wrap: normal !important;
    text-transform: none !important;
    text-indent: 0 !important;
    font-style: normal !important;
    font-variant: normal !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-image: none !important;
    text-shadow: none !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Размеры кнопок */
.wtp-button.size-small,
.wtp-button.small {
    padding: 8px 16px !important;
    font-size: 12px !important;
    min-width: 80px !important;
}

.wtp-button.size-medium,
.wtp-button.medium {
    padding: 12px 24px !important;
    font-size: 14px !important;
    min-width: 100px !important;
}

.wtp-button.size-large,
.wtp-button.large {
    padding: 16px 32px !important;
    font-size: 16px !important;
    min-width: 120px !important;
}

/* Цветовые схемы кнопок */
.wtp-button.primary {
    background-color: #0073aa !important;
    color: #ffffff !important;
    border: 2px solid #0073aa !important;
}

.wtp-button.primary:hover {
    background-color: #005a87 !important;
    border-color: #005a87 !important;
    transform: translateY(-1px) !important;
}

.wtp-button.secondary {
    background-color: #6c757d !important;
    color: #ffffff !important;
    border: 2px solid #6c757d !important;
}

.wtp-button.secondary:hover {
    background-color: #5a6268 !important;
    border-color: #5a6268 !important;
    transform: translateY(-1px) !important;
}

.wtp-button.success {
    background-color: #28a745 !important;
    color: #ffffff !important;
    border: 2px solid #28a745 !important;
}

.wtp-button.success:hover {
    background-color: #218838 !important;
    border-color: #218838 !important;
    transform: translateY(-1px) !important;
}

.wtp-button.danger {
    background-color: #dc3545 !important;
    color: #ffffff !important;
    border: 2px solid #dc3545 !important;
}

.wtp-button.danger:hover {
    background-color: #c82333 !important;
    border-color: #c82333 !important;
    transform: translateY(-1px) !important;
}

.wtp-button.warning {
    background-color: #ffc107 !important;
    color: #212529 !important;
    border: 2px solid #ffc107 !important;
}

.wtp-button.warning:hover {
    background-color: #e0a800 !important;
    border-color: #e0a800 !important;
    transform: translateY(-1px) !important;
}

.wtp-button.shadow-lift {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: #ffffff !important;
    border: 2px solid transparent !important;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4) !important;
}

.wtp-button.shadow-lift:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6) !important;
}

/* Иконки кнопок */
.wtp-button .button-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.1em !important;
    line-height: 1 !important;
}

/* Контейнер кнопок */
.wtp-popup-actions {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 12px !important;
    flex-wrap: wrap !important;
    margin-top: 20px !important;
    padding: 0 !important;
}

/* Позиционирование кнопок */
.wtp-popup-actions.buttons-left {
    justify-content: flex-start !important;
}

.wtp-popup-actions.buttons-center {
    justify-content: center !important;
}

.wtp-popup-actions.buttons-right {
    justify-content: flex-end !important;
}

.wtp-popup-actions.buttons-stretch {
    justify-content: stretch !important;
}

.wtp-popup-actions.buttons-stretch .wtp-button {
    flex: 1 !important;
}

/* Отступы между кнопками */
.wtp-popup-actions.buttons-spacing-small {
    gap: 8px !important;
}

.wtp-popup-actions.buttons-spacing-medium {
    gap: 12px !important;
}

.wtp-popup-actions.buttons-spacing-large {
    gap: 16px !important;
}

/* Сообщения в попапах */
.wtp-popup-message {
    padding: 10px 15px !important;
    margin: 10px 0 !important;
    border-radius: 4px !important;
    font-size: 14px !important;
    text-align: center !important;
    position: relative !important;
    z-index: 1000 !important;
}

.wtp-popup-message.wtp-message-success {
    background-color: #d4edda !important;
    color: #155724 !important;
    border: 1px solid #c3e6cb !important;
}

.wtp-popup-message.wtp-message-error {
    background-color: #f8d7da !important;
    color: #721c24 !important;
    border: 1px solid #f5c6cb !important;
}

.wtp-popup-message.wtp-message-warning {
    background-color: #fff3cd !important;
    color: #856404 !important;
    border: 1px solid #ffeaa7 !important;
}

/* Мобильные стили */
@media screen and (max-width: 768px) {
    .wtp-popup-actions {
        flex-direction: column !important;
        gap: 10px !important;
    }
    
    .wtp-button {
        width: 100% !important;
        min-width: auto !important;
        padding: 14px 20px !important;
        font-size: 16px !important;
    }
    
    .wtp-button.size-small {
        padding: 12px 16px !important;
        font-size: 14px !important;
    }
    
    .wtp-button.size-large {
        padding: 16px 24px !important;
        font-size: 18px !important;
    }
}

/* Анимации кнопок */
.wtp-button:active {
    transform: translateY(1px) !important;
}

.wtp-button:focus {
    outline: 2px solid rgba(0, 115, 170, 0.3) !important;
    outline-offset: 2px !important;
}

/* Состояние загрузки */
.wtp-button.loading {
    pointer-events: none !important;
    opacity: 0.7 !important;
}

.wtp-button.loading::after {
    content: '' !important;
    width: 12px !important;
    height: 12px !important;
    border: 2px solid transparent !important;
    border-top: 2px solid currentColor !important;
    border-radius: 50% !important;
    animation: wtp-button-spin 1s linear infinite !important;
    margin-left: 8px !important;
}

@keyframes wtp-button-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Формы в попапах */
.wtp-popup-content form {
    margin: 0 !important;
}

.wtp-popup-content form input,
.wtp-popup-content form textarea {
    width: 100% !important;
    padding: 10px !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    font-size: 14px !important;
    margin-bottom: 10px !important;
    box-sizing: border-box !important;
}

.wtp-popup-content form input.error,
.wtp-popup-content form textarea.error {
    border-color: #dc3545 !important;
    background-color: #f8d7da !important;
}

.wtp-popup-content form input:focus,
.wtp-popup-content form textarea:focus {
    outline: none !important;
    border-color: #0073aa !important;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2) !important;
}
