/* Help Centre Styling */

.help-page {
    background: var(--bg-primary);
    color: var(--text-primary);
}

.section-padding {
    padding: var(--space-xl) 0;
}

/* Hero & Search */
.help-hero {
    padding: 160px 0 60px;
    text-align: center;
    background: radial-gradient(circle at top, rgba(0, 243, 255, 0.05), transparent);
}

.hero-title {
    font-size: clamp(3rem, 10vw, 5rem);
    font-family: var(--font-heading);
    line-height: 0.9;
    margin-bottom: var(--space-lg);
}

.help-search-container {
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 40px;
    padding: 5px 25px;
    display: flex;
    align-items: center;
    transition: 0.3s;
}

.help-search-container:focus-within {
    border-color: var(--electric-blue);
    box-shadow: 0 0 30px rgba(0, 243, 255, 0.2);
}

#help-search {
    flex: 1;
    background: transparent;
    border: none;
    padding: 20px 0;
    color: var(--text-primary);
    font-size: 1.1rem;
    outline: none;
}

.search-icon {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0.5;
    transition: 0.3s;
}

.search-icon:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* Support Tiles */
.tiles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
}

.support-tile {
    padding: var(--space-lg);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    text-align: center;
    cursor: pointer;
    transition: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.support-tile:hover {
    transform: translateY(-10px);
    border-color: var(--magenta);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.tile-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.support-tile h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.support-tile p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.status-online {
    display: inline-block;
    margin-top: 15px;
    font-size: 0.8rem;
    color: #00ff9d;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 2px;
}

.status-online::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #00ff9d;
    border-radius: 50%;
    margin-right: 8px;
    box-shadow: 0 0 10px #00ff9d;
}

/* FAQ Accordion */
.faq-list {
    max-width: 800px;
    margin: 40px auto 0;
}

.faq-item {
    margin-bottom: 20px;
    border-bottom: 1px solid var(--glass-border);
}

.faq-question {
    padding: 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 700;
    font-size: 1.1rem;
    transition: 0.3s;
}

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

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
}

.faq-answer p {
    padding-bottom: 20px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.faq-item.active .faq-answer {
    max-height: 200px;
}

.faq-item.active .faq-toggle {
    transform: rotate(45deg);
}

/* Modal Styling */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal-content {
    width: 100%;
    max-width: 600px;
    padding: var(--space-xl);
    position: relative;
    border-radius: 40px;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 30px;
    background: none;
    border: none;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
}

/* Chat Widget */
.chat-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 380px;
    height: 500px;
    background: var(--bg-primary);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    display: none; /* Controlled by JS */
    flex-direction: column;
    z-index: 999;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    overflow: hidden;
}

.chat-header {
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.agent-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.agent-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(45deg, var(--magenta), var(--electric-blue));
    border-radius: 50%;
}

.agent-name {
    display: block;
    font-weight: 700;
    font-size: 0.95rem;
}

.agent-status {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.close-chat {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.message.agent {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.05);
    border-bottom-left-radius: 4px;
}

.message.user {
    align-self: flex-end;
    background: var(--electric-blue);
    color: white;
    border-bottom-right-radius: 4px;
}

.message.system {
    align-self: center;
    background: none;
    color: var(--text-secondary);
    font-size: 0.75rem;
    text-align: center;
}

.chat-input {
    padding: 20px;
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid var(--glass-border);
    display: flex;
    gap: 10px;
}

.chat-input input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    padding: 12px 15px;
    border-radius: 12px;
    color: var(--text-primary);
    outline: none;
}

.chat-input button {
    background: var(--magenta);
    color: white;
    border: none;
    padding: 0 20px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 700;
}

.support-tile.restricted {
    opacity: 0.7;
    filter: grayscale(0.5);
    position: relative;
}

.support-tile.restricted::after {
    content: '🔒';
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 1.2rem;
    opacity: 0.5;
}

.support-tile.restricted:hover {
    filter: grayscale(0);
    opacity: 1;
    border-color: var(--electric-blue);
}

/* Auth Overlay Message */
.auth-overlay-msg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(15px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.overlay-content {
    text-align: center;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: var(--space-xl);
    border-radius: 40px;
    max-width: 450px;
    transform: scale(0.9);
    transition: 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
}

.auth-overlay-msg.active .overlay-content {
    transform: scale(1);
}

.overlay-content h3 {
    font-size: 2rem;
    margin-bottom: 15px;
    font-family: var(--font-heading);
    color: var(--text-primary);
}

.overlay-content p {
    color: var(--text-secondary);
    margin-bottom: 30px;
    line-height: 1.6;
}

.overlay-btn {
    display: inline-block;
    padding: 15px 35px;
    background: linear-gradient(90deg, var(--electric-blue), var(--magenta));
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 15px;
    transition: 0.3s;
}

.overlay-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 243, 255, 0.3);
}

.close-overlay {
    display: block;
    width: 100%;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.9rem;
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 900px) {
    .tiles-grid {
        grid-template-columns: 1fr;
    }
    .chat-container {
        width: calc(100% - 40px);
        bottom: 20px;
        right: 20px;
    }
}

/* Chat Animations & Typing Indicator */
@keyframes chatSlideIn {
    from { opacity: 0; transform: translateY(50px) scale(0.9); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes chatSlideOut {
    from { opacity: 1; transform: translateY(0) scale(1); }
    to { opacity: 0; transform: translateY(50px) scale(0.9); }
}

.message.typing {
    display: flex;
    gap: 4px;
    padding: 15px 20px;
}

.message.typing span {
    width: 6px;
    height: 6px;
    background: var(--text-secondary);
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out;
}

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

@keyframes typingBounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}
