/**
 * 플로팅 메뉴 스타일
 */

/* 메뉴 버튼 */
#floating-menu-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    z-index: 998;
    display: flex;
    align-items: center;
    justify-content: center;
}

#floating-menu-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

#floating-menu-button:active {
    transform: scale(0.95);
}

/* 메뉴 옵션 */
.floating-menu-options {
    position: fixed;
    bottom: 95px;
    right: 30px;
    display: none;
    flex-direction: column;
    gap: 10px;
    z-index: 999;
    animation: slideUp 0.3s ease;
}

.floating-menu-options.show {
    display: flex;
}

.floating-menu-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: white;
    border: 2px solid #667eea;
    border-radius: 28px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    white-space: nowrap;
    min-width: 120px;
    position: relative;
}

.floating-menu-option:hover {
    transform: translateX(-5px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
    border-color: #764ba2;
}

.menu-icon {
    font-size: 20px;
}

.menu-text {
    font-weight: 600;
    color: #667eea;
    font-size: 14px;
}

/* 채팅 읽지 않은 메시지 배지 (채팅 버튼용) */
.chat-unread-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: #F44336;
    color: white;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(244, 67, 54, 0.4);
    animation: pulse 2s infinite;
}

/* 메뉴 버튼 배지 (메인 버튼용) */
.menu-unread-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: #F44336;
    color: white;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(244, 67, 54, 0.4);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* FAQ 모달 */
.faq-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
}

.faq-modal.show {
    display: block;
}

.faq-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

.faq-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 900px;
    max-height: 85vh;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUpModal 0.3s ease;
    display: flex;
    flex-direction: column;
}

.faq-modal-header {
    padding: 2rem 2rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    position: relative;
}

.faq-modal-header h2 {
    font-size: 1.8rem;
    color: #2c3e50;
    margin: 0 0 0.5rem;
    font-weight: 700;
}

.faq-modal-header p {
    color: #7f8c8d;
    font-size: 1rem;
    margin: 0;
}

.faq-modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    font-size: 2rem;
    color: #95a5a6;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.faq-modal-close:hover {
    background: #f8f9fa;
    color: #2c3e50;
}

.faq-modal-body {
    padding: 2rem;
    overflow-y: auto;
    flex: 1;
}

.faq-modal-item {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.faq-modal-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.faq-modal-item:last-child {
    margin-bottom: 0;
}

.faq-modal-item h3 {
    color: #2c3e50;
    font-size: 1.2rem;
    margin: 0 0 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.faq-modal-q-icon {
    background: #3498db;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    font-size: 1rem;
    flex-shrink: 0;
}

.faq-modal-answer {
    color: #555;
    line-height: 1.8;
    padding-left: 3rem;
}

.faq-modal-answer p {
    margin: 0 0 1rem;
}

.faq-modal-answer p:last-child {
    margin-bottom: 0;
}

/* 애니메이션 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUpModal {
    from {
        opacity: 0;
        transform: translate(-50%, -45%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/* 스크롤바 스타일 */
.faq-modal-body::-webkit-scrollbar {
    width: 8px;
}

.faq-modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.faq-modal-body::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.faq-modal-body::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* 모바일 대응 */
@media (max-width: 768px) {
    #floating-menu-button {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 20px;
    }

    .floating-menu-options {
        bottom: 75px;
        right: 20px;
    }

    .floating-menu-option {
        padding: 10px 16px;
        min-width: 100px;
    }

    .menu-icon {
        font-size: 18px;
    }

    .menu-text {
        font-size: 13px;
    }

    .chat-unread-badge {
        top: -6px;
        right: -6px;
        min-width: 18px;
        height: 18px;
        font-size: 10px;
    }

    .menu-unread-badge {
        top: -3px;
        right: -3px;
        min-width: 18px;
        height: 18px;
        font-size: 10px;
    }
}

    .faq-modal-content {
        width: 95%;
        max-height: 90vh;
    }

    .faq-modal-header {
        padding: 1.5rem;
    }

    .faq-modal-header h2 {
        font-size: 1.5rem;
    }

    .faq-modal-body {
        padding: 1.5rem;
    }

    .faq-modal-item {
        padding: 1.25rem;
    }

    .faq-modal-item h3 {
        font-size: 1.1rem;
    }

    .faq-modal-answer {
        padding-left: 0;
        font-size: 0.95rem;
    }

    .faq-modal-q-icon {
        width: 28px;
        height: 28px;
        font-size: 0.9rem;
        margin-right: 0.75rem;
    }
}
