/* ==========================================
   FAQ SECTION AND TOURIST TIPS
   FAQ Display, Tourist Tips with iMessage Style
   ========================================== */

/* Two Column Layout for FAQ Section */
.faq-two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

/* Left Column - FAQs */
.faq-display-column {
    display: flex;
    flex-direction: column;
}

.faq-container {
    max-height: 700px;
    overflow-y: auto;
    padding-right: 1rem;
    scroll-behavior: smooth;
}

/* Custom scrollbar for FAQ container */
.faq-container::-webkit-scrollbar {
    width: 6px;
}

.faq-container::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.faq-container::-webkit-scrollbar-thumb {
    background: var(--primary-blue);
    border-radius: 3px;
}

.faq-container::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-blue);
}

.faq-item {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: #d1d5db;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.faq-question {
    width: 100%;
    padding: 1.25rem 1.5rem;
    background: transparent;
    border: none;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    transition: all 0.3s ease;
}

.faq-question:hover {
    color: var(--primary-blue);
}

.faq-question i {
    color: var(--accent-yellow);
    font-size: 0.875rem;
    transition: transform 0.3s ease;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 1.5rem;
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding: 0 1.5rem 1.25rem;
}

.faq-answer p {
    margin: 0;
    color: #6b7280;
    line-height: 1.7;
    font-size: 0.95rem;
}

/* Right Column - Tourist Tips */
.tips-form-column {
    position: sticky;
    top: 2rem;
}

.tips-section {
    background: linear-gradient(135deg, #fffef8 0%, #fff9e6 100%);
    border: 2px solid var(--accent-yellow);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.15);
}

.tips-section-title {
    text-align: center;
    color: var(--primary-blue);
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

.tips-section-subtitle {
    text-align: center;
    color: #9ca3af;
    font-size: 0.875rem;
    margin-bottom: 1.75rem;
    font-weight: 400;
    letter-spacing: -0.01em;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

/* Tips Display Area - Enhanced Apple iMessage Style */
.tips-display {
    height: 450px;
    width: 100%;
    max-width: 650px;
    overflow-y: auto;
    margin: 0 auto 1.5rem;
    padding: 1.25rem 1rem;
    background: linear-gradient(to bottom, #fafafa 0%, #ffffff 100%);
    border-radius: 20px;
    border: 1px solid #e5e5ea;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.03);
}

.tips-display::-webkit-scrollbar {
    width: 3px;
}

.tips-display::-webkit-scrollbar-track {
    background: transparent;
}

.tips-display::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.12);
    border-radius: 2px;
}

.tips-display::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.2);
}

/* Tip Card - Premium iMessage Bubble */
.tip-card {
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
    margin-bottom: 1.25rem;
    animation: messageSlideIn 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transition: opacity 0.4s ease;
}

/* Right-aligned messages (gray bubbles) */
.tip-card-right {
    flex-direction: row-reverse;
}

.tip-card-avatar {
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.tip-card-avatar img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.tip-card-no-photo {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #e5e5ea;
    border: 1px solid #d1d5db;
}

.tip-card-info {
    flex: 1;
    min-width: 0;
}

.tip-card-header {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.2rem;
    padding-left: 0.15rem;
}

/* Right message - align header to the right */
.tip-card-right .tip-card-header {
    flex-direction: row-reverse;
    justify-content: flex-start;
    padding-left: 0;
    padding-right: 0.15rem;
}

.tip-card-name {
    font-weight: 600;
    color: #000000;
    font-size: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    letter-spacing: -0.01em;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

.tip-card-name .fas.fa-check-circle {
    color: #007aff;
    font-size: 0.75rem;
    margin-left: -0.1rem;
}

.tip-card-date {
    color: #8e8e93;
    font-size: 0.625rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    letter-spacing: -0.01em;
    font-weight: 400;
}

/* Category badge */
.tip-card-category-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(142, 142, 147, 0.12);
    color: #3c3c43;
    padding: 0.125rem 0.4rem;
    border-radius: 10px;
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    margin-top: 0.3rem;
    margin-left: 0.15rem;
}

/* Right message - align category badge to the right */
.tip-card-right .tip-card-category-badge {
    margin-left: 0;
    margin-right: 0.15rem;
    align-self: flex-end;
}

/* Premium iMessage Blue Bubble (Left messages) */
.tip-card-content {
    background: linear-gradient(135deg, #007aff 0%, #0062cc 100%);
    color: white;
    padding: 0.625rem 0.875rem;
    border-radius: 20px;
    border-top-left-radius: 5px;
    font-size: 0.9rem;
    line-height: 1.45;
    max-width: 85%;
    word-wrap: break-word;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 122, 255, 0.15);
    position: relative;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    letter-spacing: -0.015em;
    transition: all 0.25s ease;
}

.tip-card-content::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 0;
    width: 12px;
    height: 12px;
    background: linear-gradient(135deg, #007aff 0%, #0051d5 100%);
    clip-path: polygon(0 0, 100% 0, 0 100%);
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.08));
}

/* Gray Bubble for Right messages (received messages) */
.tip-card-right .tip-card-content {
    background: #e5e5ea;
    color: #000000;
    border-top-left-radius: 18px;
    border-top-right-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.tip-card-right .tip-card-content::before {
    left: auto;
    right: -6px;
    background: #e5e5ea;
    clip-path: polygon(100% 0, 0 0, 100% 100%);
}

/* Hover effect - iOS style */
.tip-card:hover .tip-card-content {
    box-shadow: 0 2px 3px rgba(0, 0, 0, 0.12), 0 3px 8px rgba(0, 122, 255, 0.15);
    transform: translateY(-0.5px);
}

.tip-card-right:hover .tip-card-content {
    box-shadow: 0 2px 3px rgba(0, 0, 0, 0.1);
}

/* Typing Indicator - iMessage Style */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.75rem;
    margin-left: 36px;
    max-width: 50px;
    background: #e5e5ea;
    border-radius: 16px;
    animation: fadeIn 0.3s ease;
}

.typing-indicator span {
    width: 6px;
    height: 6px;
    background: #8e8e93;
    border-radius: 50%;
    animation: typingDot 1.4s infinite;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

/* Submit Tip Form */
.submit-tip-container {
    border-top: 2px dashed var(--accent-yellow);
    padding-top: 1.5rem;
}

.tip-form-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-blue);
    margin-bottom: 1rem;
    text-align: center;
}

.tip-form-group {
    margin-bottom: 1rem;
    position: relative;
}

.tip-form-group input,
.tip-form-group select,
.tip-form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    background: #ffffff;
}

.tip-form-group input:focus,
.tip-form-group select:focus,
.tip-form-group textarea:focus {
    outline: none;
    border-color: var(--accent-yellow);
    box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.1);
}

.tip-form-group textarea {
    resize: vertical;
    font-family: inherit;
}

/* Sign-In Section */
.tip-signin-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.google-signin-btn-tip {
    width: 100%;
    padding: 0.75rem;
    background: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.google-signin-btn-tip:hover {
    background: #f9fafb;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

/* Messenger-Style Form */
.messenger-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Category Selector */
.messenger-category select {
    width: 100%;
    padding: 0.65rem 0.875rem;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

.messenger-category select:focus {
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

/* Message Composer (Messenger Style) */
.messenger-composer {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 24px;
    padding: 0.5rem;
}

.messenger-composer textarea {
    flex: 1;
    padding: 0.625rem 0.875rem;
    border: none;
    outline: none;
    background: transparent;
    font-size: 0.9rem;
    line-height: 1.4;
    resize: none;
    min-height: 40px;
    max-height: 120px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

.messenger-composer textarea::placeholder {
    color: #9ca3af;
}

/* Send Button (Messenger Style) */
.messenger-send-btn {
    width: 36px;
    height: 36px;
    background: #007aff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.messenger-send-btn i {
    color: white;
    font-size: 0.875rem;
}

.messenger-send-btn:hover {
    background: #0051d5;
    transform: scale(1.05);
}

.messenger-send-btn:active {
    transform: scale(0.95);
}

.messenger-send-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
}

/* Messenger-Style Direct Form */
.messenger-direct-form {
    width: 100%;
    margin-top: 1rem;
}

.messenger-input-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Category Selector (Inline) */
.messenger-category-inline {
    width: 100%;
    padding: 0.5rem 0.875rem;
    background: #f9fafb;
    border: 1px solid #e5e5ea;
    border-radius: 16px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

.messenger-category-inline:focus {
    background: #ffffff;
    border-color: #007aff;
}

/* Input Container (Messenger Style) */
.messenger-input-container {
    width: 100%;
    max-width: 650px;
    margin: 0 auto;
    display: flex;
    align-items: flex-end;
    gap: 0.625rem;
    padding: 0.625rem 0.875rem 0.625rem 1.125rem;
    background: #ffffff;
    border: 1.5px solid #e5e5ea;
    border-radius: 26px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
}

.messenger-input-container:focus-within {
    border-color: #007aff;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.15), 0 2px 6px rgba(0, 122, 255, 0.1);
    transform: translateY(-1px);
}

.messenger-input-container textarea {
    flex: 1;
    padding: 0.5rem 0;
    border: none;
    outline: none;
    background: transparent;
    font-size: 0.9375rem;
    line-height: 1.45;
    resize: none;
    min-height: 24px;
    max-height: 120px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    letter-spacing: -0.01em;
}

.messenger-input-container textarea::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

/* Send Button */
.messenger-send-icon {
    width: 34px;
    height: 34px;
    background: linear-gradient(135deg, #007aff 0%, #0062cc 100%);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 6px rgba(0, 122, 255, 0.25);
}

.messenger-send-icon i {
    color: white;
    font-size: 0.875rem;
}

.messenger-send-icon:hover:not(:disabled) {
    background: linear-gradient(135deg, #0062cc 0%, #004fa3 100%);
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.35);
}

.messenger-send-icon:active:not(:disabled) {
    transform: scale(0.92);
}

.messenger-send-icon:disabled {
    background: #d1d5db;
    cursor: not-allowed;
    box-shadow: none;
}

/* Sign-in Prompt */
.tip-signin-prompt {
    background: #f9fafb;
    border: 1px solid #e5e5ea;
    border-radius: 16px;
    padding: 1rem;
    text-align: center;
    margin-top: 1rem;
}

.tip-signin-prompt p {
    color: #6b7280;
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

.google-signin-btn-inline {
    padding: 0.625rem 1rem;
    background: #ffffff;
    border: 1px solid #e5e5ea;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.google-signin-btn-inline:hover {
    background: #f9fafb;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
}

/* Tip Modal Popup - Phone Chat Style */
.tip-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.3s ease;
}

.tip-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.tip-modal-content {
    background: linear-gradient(135deg, #0a2463 0%, #1e3d72 100%);
    border-radius: 30px;
    width: 90%;
    max-width: 380px;
    max-height: 650px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    display: flex;
    flex-direction: column;
    border: 3px solid rgba(255, 193, 7, 0.3);
}

/* Phone-style Header */
.tip-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.tip-modal-header h3 {
    font-size: 1.1rem;
    color: white;
    margin: 0;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tip-modal-header h3::before {
    content: '💬';
    font-size: 1.3rem;
}

.tip-modal-close {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    font-size: 1.5rem;
    color: white;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.tip-modal-close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: rotate(90deg);
}

/* Chat-style Form */
.tip-modal #submitTipForm {
    padding: 1.25rem;
    background: #f0f2f5;
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.tip-modal .tip-form-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tip-modal .tip-form-group input,
.tip-modal .tip-form-group select {
    background: white;
    border: none;
    border-radius: 18px;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    outline: none;
    transition: all 0.2s ease;
    flex: 1;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.tip-modal .tip-form-group input:focus,
.tip-modal .tip-form-group select:focus {
    box-shadow: 0 2px 8px rgba(10, 36, 99, 0.15);
}

.tip-modal textarea {
    background: white;
    border: none;
    border-radius: 16px;
    padding: 0.875rem 1rem;
    font-size: 0.9rem;
    outline: none;
    resize: none;
    transition: all 0.2s ease;
    font-family: inherit;
    min-height: 100px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.tip-modal textarea:focus {
    box-shadow: 0 2px 8px rgba(10, 36, 99, 0.15);
}

.tip-modal .verified-badge {
    color: #10b981;
    font-size: 1.25rem;
}

.tip-modal .google-signin-btn-tip {
    background: white;
    border: none;
    border-radius: 18px;
    padding: 0.7rem 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.85rem;
    font-weight: 500;
    color: #374151;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.tip-modal .google-signin-btn-tip:hover {
    background: #f9fafb;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.tip-modal .btn-submit-tip {
    background: linear-gradient(135deg, #ffc107 0%, #ffb300 100%);
    border: none;
    border-radius: 20px;
    padding: 0.875rem 1.5rem;
    color: #0a2463;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
    margin-top: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tip-modal .btn-submit-tip:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 193, 7, 0.4);
}

.tip-modal .btn-submit-tip:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Responsive for FAQ Two-Column */
@media (max-width: 968px) {
    .faq-two-column {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .tips-form-column {
        position: relative;
        top: 0;
    }

    .faq-container {
        max-height: 500px;
    }

    .tips-display {
        max-height: 250px;
    }
}
