/* Style dla systemu wyskakujących okienek - Wersja elegancka */

.popup-widgets-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column-reverse;
    gap: 15px;
    z-index: 9999;
}

.popup-widget {
    width: 60px;
    height: 60px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    border: 2px solid #76b16e;
    opacity: 0;
    transform: scale(0.5) translateY(20px);
}

.popup-widget.active {
    opacity: 1;
    transform: scale(1) translateY(0);
}

.popup-widget:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: #5d8f56;
}

.popup-widget img {
    width: 35px;
    height: 35px;
    object-fit: contain;
    border-radius: 50%;
}

.popup-widget .badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #ff4757;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    border: 2px solid white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.popup-widget::after {
    content: attr(data-tooltip);
    position: absolute;
    right: 70px;
    background: rgba(44, 62, 80, 0.9);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    pointer-events: none;
}

.popup-widget:hover::after {
    opacity: 1;
    visibility: visible;
    right: 75px;
}

.popup-widget.dragging {
    transition: none;
    opacity: 0.7;
}

.popup-widget.swiped-out {
    transform: translateX(200%) !important;
    opacity: 0 !important;
    transition: all 0.5s ease !important;
}

.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Zawartość popup - elegancka kompaktowa karta */
.popup-content {
    background: #ffffff;
    border-radius: 12px;
    box-shadow:
        0 15px 40px rgba(0, 0, 0, 0.15),
        0 6px 20px rgba(0, 0, 0, 0.1);
    max-width: 550px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.popup-overlay.active .popup-content {
    transform: scale(1) translateY(0);
}

/* Logo Centrum Origami w popup */
.popup-logo {
    text-align: center;
    margin-bottom: 15px;
    padding-top: 15px;
}

.popup-logo img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.1);
    border: 2px solid #f0f0f0;
}

/* Przycisk zamknięcia - elegancki i minimalistyczny */
.popup-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    font-size: 20px;
    cursor: pointer;
    color: #6c757d;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s ease;
    z-index: 1;
}

.popup-close:hover {
    background: #e9ecef;
    color: #495057;
    transform: scale(1.05);
}

/* Popup konsultacji online */
.popup-consultation {
    padding: 30px 30px 25px;
    text-align: center;
}

.popup-consultation h3 {
    color: #2c3e50;
    margin-bottom: 12px;
    font-size: 24px;
    font-weight: 600;
    line-height: 1.1;
}

.popup-consultation p {
    color: #5a6c7d;
    margin-bottom: 16px;
    font-size: 15px;
    line-height: 1.3;
}

/* Popup pomocy dla młodzieży */
.popup-youth-help {
    padding: 30px 30px 25px;
    text-align: center;
}

.popup-youth-help h3 {
    color: #2c3e50;
    margin-bottom: 12px;
    font-size: 24px;
    font-weight: 600;
    line-height: 1.1;
}

.popup-youth-help p {
    color: #5a6c7d;
    margin-bottom: 16px;
    font-size: 15px;
    line-height: 1.3;
}

.popup-features {
    display: flex;
    justify-content: space-around;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.popup-features .feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 8px 12px;
    min-width: 90px;
    flex: 1;
}

.popup-features .icon {
    width: 24px;
    height: 24px;
    margin-bottom: 4px;
    opacity: 0.8;
    color: #007bff;
}

.popup-features span:last-child {
    font-size: 12px;
    color: #5a6c7d;
    text-align: center;
    font-weight: 500;
    line-height: 1.2;
}

/* Popup TUS */
.popup-tus {
    padding: 30px 30px 25px;
    text-align: center;
}

.popup-tus h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 22px;
    font-weight: 600;
}

.popup-tus > p {
    color: #5a6c7d;
    margin-bottom: 18px;
    font-size: 15px;
    line-height: 1.5;
}

.popup-benefits {
    text-align: left;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 3px solid #007bff;
}

.popup-benefits p {
    margin: 4px 0;
    font-size: 14px;
    color: #495057;
    line-height: 1.3;
}

/* Popup edukacyjny */
.popup-educational {
    padding: 30px 30px 25px;
    text-align: center;
}

.popup-educational h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 22px;
    font-weight: 600;
}

.popup-educational > p {
    color: #5a6c7d;
    margin-bottom: 18px;
    font-size: 15px;
    line-height: 1.5;
}

.educational-services {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.educational-services .service {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    text-align: left;
    border-left: 3px solid #28a745;
}

.educational-services h4 {
    margin: 0 0 6px 0;
    color: #2c3e50;
    font-size: 16px;
    font-weight: 600;
}

.educational-services p {
    margin: 0;
    font-size: 14px;
    color: #5a6c7d;
    line-height: 1.3;
}

/* Popup reklamowy */
.popup-advertising {
    padding: 30px 30px 25px;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
}

.popup-advertising h3 {
    margin-bottom: 15px;
    font-size: 22px;
    font-weight: 600;
}

.popup-advertising p {
    margin-bottom: 20px;
    opacity: 0.95;
    font-size: 15px;
    line-height: 1.5;
}

/* Formularze w popup */
.popup-form {
    margin-top: 18px;
}

.popup-form h4 {
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 16px;
    font-weight: 600;
}

.popup-form form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.popup-form input,
.popup-form select {
    padding: 12px 14px;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s ease;
    background: #ffffff;
}

.popup-form input:focus,
.popup-form select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.popup-form input::placeholder {
    color: #adb5bd;
}

/* Przyciski */
.popup-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

.btn-primary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s ease;
    box-shadow: 0 3px 10px rgba(0, 123, 255, 0.2);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.3);
}

.btn-secondary {
    background: #f8f9fa;
    color: #495057;
    border: 1px solid #dee2e6;
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.btn-close {
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    font-size: 15px;
    margin-top: 20px;
    text-decoration: underline;
    font-weight: 500;
}

.btn-close:hover {
    color: #495057;
}

@media (max-width: 768px) {
    .popup-widgets-container {
        bottom: 20px;
        right: 20px;
        gap: 10px;
    }

    .popup-widget {
        width: 50px;
        height: 50px;
        border-width: 1.5px;
    }

    .popup-widget img {
        width: 30px;
        height: 30px;
    }

    .popup-widget .badge {
        width: 16px;
        height: 16px;
        font-size: 10px;
        top: -4px;
        right: -4px;
    }

    .popup-widget::after {
        display: none;
    }

    .popup-content {
        width: 95%;
        margin: 15px;
    }

    .popup-consultation,
    .popup-tus,
    .popup-educational,
    .popup-advertising,
    .popup-youth-help {
        padding: 20px 15px 15px;
    }

    .popup-features {
        flex-direction: column;
        align-items: center;
    }

    .popup-features .feature {
        margin: 8px 0;
    }

    .popup-buttons {
        flex-direction: column;
        gap: 8px;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        text-align: center;
        padding: 14px 16px;
    }

    .popup-consultation h3,
    .popup-youth-help h3 {
        font-size: 20px;
    }

    .popup-logo img {
        width: 50px;
        height: 50px;
    }
}
