/* ==========================================================================
   AI SUMMARY REQUEST - Standalone Section
   Sekcja "Zapytaj AI o AI Biznes Lab" przed stopką
   ========================================================================== */

/* ==========================================================================
   SECTION STYLING - Ulepszone
   ========================================================================== */

.ai-summary-section {
    padding: 4rem 2rem;
    background: linear-gradient(180deg,
        rgba(251, 247, 242, 0.6) 0%,
        rgba(201, 74, 42, 0.04) 50%,
        rgba(251, 247, 242, 0.8) 100%
    );
    border-top: 1px solid rgba(201, 74, 42, 0.08);
    border-bottom: 1px solid rgba(201, 74, 42, 0.08);
    position: relative;
    overflow: hidden;
}

/* Subtelny pattern w tle */
.ai-summary-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(circle at 20% 50%, rgba(201, 74, 42, 0.03) 0%, transparent 50%),
                      radial-gradient(circle at 80% 50%, rgba(42, 92, 78, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

.ai-summary-container {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.ai-summary-title {
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--warmth-charcoal, #2C2625);
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}

.ai-summary-subtitle {
    font-size: 0.95rem;
    color: var(--warmth-charcoal, #2C2625);
    opacity: 0.6;
    margin-bottom: 1.75rem;
    font-weight: 400;
}

.ai-summary-icons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.ai-summary-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px !important;
    height: 60px !important;
    border-radius: 16px !important;
    background: white !important;
    border: 1.5px solid rgba(201, 74, 42, 0.1) !important;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    padding: 0 !important;
    box-shadow: 0 4px 12px rgba(44, 38, 37, 0.04),
                0 2px 4px rgba(44, 38, 37, 0.02);
}

.ai-summary-btn:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 16px 32px rgba(201, 74, 42, 0.12),
                0 8px 16px rgba(44, 38, 37, 0.06);
    border-color: var(--warmth-primary, #C94A2A);
    background: white;
}

.ai-summary-btn:active {
    transform: translateY(-3px) scale(1.01);
}

.ai-summary-btn svg {
    width: 28px !important;
    height: 28px !important;
    color: var(--warmth-charcoal, #2C2625);
    transition: all 0.35s cubic-bezier(0.23, 1, 0.32, 1);
}

.ai-summary-btn:hover svg {
    transform: scale(1.1);
    color: var(--warmth-primary, #C94A2A);
}

/* Tooltip */
.ai-summary-btn::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    padding: 0.6rem 1rem;
    background: var(--warmth-charcoal, #2C2625);
    color: white;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 10px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s cubic-bezier(0.23, 1, 0.32, 1);
    pointer-events: none;
    z-index: 10;
    box-shadow: 0 8px 24px rgba(44, 38, 37, 0.2);
}

.ai-summary-btn::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--warmth-charcoal, #2C2625);
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s cubic-bezier(0.23, 1, 0.32, 1);
    pointer-events: none;
    z-index: 10;
}

.ai-summary-btn:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.ai-summary-btn:hover::before {
    opacity: 1;
    visibility: visible;
}

/* ==========================================================================
   MODAL STYLING
   ========================================================================== */

.ai-summary-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(44, 38, 37, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.ai-summary-modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.ai-summary-modal {
    background: white;
    border-radius: 24px;
    padding: 2.5rem 2rem;
    max-width: 400px;
    width: 100%;
    text-align: center;
    position: relative;
    box-shadow: 0 32px 64px rgba(44, 38, 37, 0.25),
                0 16px 32px rgba(201, 74, 42, 0.1);
    transform: scale(0.9) translateY(20px);
    transition: all 0.35s cubic-bezier(0.23, 1, 0.32, 1);
}

.ai-summary-modal-overlay.show .ai-summary-modal {
    transform: scale(1) translateY(0);
}

.ai-summary-modal-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(201, 74, 42, 0.08) 0%, rgba(42, 92, 78, 0.08) 100%);
    border-radius: 20px;
    position: relative;
}

.ai-summary-modal-icon svg {
    width: 36px;
    height: 36px;
    color: var(--warmth-charcoal, #2C2625);
}

.ai-summary-modal-check {
    position: absolute;
    bottom: -6px;
    right: calc(50% - 48px);
    width: 28px;
    height: 28px;
    background: #10b981;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.ai-summary-modal-check svg {
    width: 16px;
    height: 16px;
    color: white;
}

.ai-summary-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--warmth-charcoal, #2C2625);
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.ai-summary-modal-text {
    font-size: 1rem;
    color: var(--warmth-charcoal, #2C2625);
    opacity: 0.7;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.ai-summary-modal-text strong {
    color: var(--warmth-primary, #C94A2A);
    font-weight: 600;
}

.ai-summary-modal-shortcut {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.75rem;
    padding: 1rem;
    background: rgba(201, 74, 42, 0.04);
    border-radius: 12px;
    border: 1px dashed rgba(201, 74, 42, 0.2);
}

.ai-summary-modal-shortcut kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    background: white;
    border: 1.5px solid rgba(201, 74, 42, 0.2);
    border-radius: 8px;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-size: 1rem;
    font-weight: 600;
    color: var(--warmth-primary, #C94A2A);
    box-shadow: 0 2px 4px rgba(44, 38, 37, 0.06);
}

.ai-summary-modal-shortcut span {
    font-size: 0.9rem;
    color: var(--warmth-charcoal, #2C2625);
    opacity: 0.7;
}

.ai-summary-modal-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 1rem 1.5rem;
    background: var(--warmth-primary, #C94A2A);
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: 0 4px 12px rgba(201, 74, 42, 0.25);
}

.ai-summary-modal-btn:hover {
    background: #b54125;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(201, 74, 42, 0.35);
}

.ai-summary-modal-btn:active {
    transform: translateY(0);
}

.ai-summary-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ai-summary-modal-close svg {
    width: 20px;
    height: 20px;
    color: var(--warmth-charcoal, #2C2625);
    opacity: 0.4;
    transition: all 0.2s ease;
}

.ai-summary-modal-close:hover {
    background: rgba(44, 38, 37, 0.05);
}

.ai-summary-modal-close:hover svg {
    opacity: 0.8;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 640px) {
    .ai-summary-section {
        padding: 3rem 1.5rem;
    }

    .ai-summary-title {
        font-size: 1.15rem;
    }

    .ai-summary-subtitle {
        font-size: 0.9rem;
    }

    .ai-summary-icons {
        gap: 0.85rem;
    }

    .ai-summary-btn {
        width: 54px;
        height: 54px;
        border-radius: 14px;
    }

    .ai-summary-btn svg {
        width: 26px;
        height: 26px;
    }

    /* Modal responsive */
    .ai-summary-modal {
        padding: 2rem 1.5rem;
        border-radius: 20px;
    }

    .ai-summary-modal-icon {
        width: 64px;
        height: 64px;
        border-radius: 16px;
    }

    .ai-summary-modal-icon svg {
        width: 32px;
        height: 32px;
    }

    .ai-summary-modal-title {
        font-size: 1.3rem;
    }

    .ai-summary-modal-text {
        font-size: 0.95rem;
    }

    .ai-summary-modal-shortcut {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.85rem;
    }

    .ai-summary-modal-shortcut kbd {
        font-size: 0.95rem;
    }
}

@media (max-width: 400px) {
    .ai-summary-btn {
        width: 48px;
        height: 48px;
    }

    .ai-summary-btn svg {
        width: 24px;
        height: 24px;
    }
}
