/* Ask Shane - Hero Search Bar */
.ask-shane-hero {
    max-width: 750px;
    margin: 32px 0 0;
}

.ask-shane-bar {
    display: flex;
}

.ask-shane-bar-input {
    width: 100%;
    font-family: var(--font-serif);
    font-size: 4rem;
    color: var(--text-color);
    background: transparent;
    border: none;
    border-bottom: 1.5px solid rgba(0, 0, 0, 0.15);
    padding: 10px 0;
    outline: none;
    transition: border-color 0.3s ease;
}

.ask-shane-bar-input::placeholder {
    color: rgba(0, 0, 0, 0.3);
    font-style: italic;
}

.ask-shane-bar-input:focus {
    border-bottom-color: var(--link-color);
}

/* Starter suggestions */
.ask-shane-starters {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 6px;
    margin-top: 12px;
    align-items: center;
}

.starter-link {
    font-family: var(--font-serif);
    font-size: 2.2rem;
    font-style: italic;
    color: rgba(0, 0, 0, 0.35);
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px 0;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    transition: color 0.3s ease;
}

.starter-link:hover {
    color: var(--link-color);
}

.starter-link:focus-visible {
    color: var(--link-color);
    outline: 2px solid var(--link-color);
    outline-offset: 2px;
}

.starter-sep {
    color: rgba(0, 0, 0, 0.2);
    font-size: 2rem;
    user-select: none;
}

/* Full-screen Modal */
.ask-shane-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: var(--bg-color);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    overflow: hidden;
}

.ask-shane-modal.open {
    opacity: 1;
    visibility: visible;
}

body.modal-open {
    overflow: hidden;
}

.ask-shane-modal-inner {
    display: flex;
    flex-direction: column;
    max-width: 660px;
    margin: 0 auto;
    height: 100%;
    padding: 40px 24px 32px;
    position: relative;
}

/* Close button */
.ask-shane-modal-close {
    position: absolute;
    top: 12px;
    right: 0;
    background: none;
    border: none;
    font-size: 3rem;
    color: rgba(0, 0, 0, 0.25);
    cursor: pointer;
    padding: 8px 13px;
    min-width: 44px;
    min-height: 44px;
    line-height: 1;
    transition: color 0.3s ease;
    z-index: 1;
}

.ask-shane-modal-close:hover {
    color: var(--text-color);
}

.ask-shane-modal-close:focus-visible {
    color: var(--text-color);
    outline: 2px solid var(--link-color);
    outline-offset: 2px;
}

/* Messages area */
.ask-shane-modal-messages {
    flex: 1;
    overflow-y: auto;
    padding: 48px 0 20px;
    scroll-behavior: smooth;
}

/* User question — displayed as a heading */
.ask-shane-msg {
    margin-bottom: 28px;
    animation: fadeIn 0.4s ease-out;
}

.ask-shane-msg-user {
    font-size: 2.8rem;
    font-weight: 500;
    line-height: 1.3;
    color: var(--text-color);
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

/* Assistant response — editorial reading text */
.ask-shane-msg-assistant {
    font-size: 2.2rem;
    line-height: 1.65;
    color: rgba(0, 0, 0, 0.78);
    margin-bottom: 32px;
}

.ask-shane-msg-assistant p {
    margin-bottom: 14px;
}

.ask-shane-msg-assistant p:last-child {
    margin-bottom: 0;
}

.ask-shane-msg-assistant strong {
    font-weight: 600;
    color: var(--text-color);
}

.ask-shane-msg-assistant em {
    font-style: italic;
}

/* Thinking indicator */
.ask-shane-thinking {
    font-size: 2.2rem;
    font-style: italic;
    color: rgba(0, 0, 0, 0.3);
    animation: thinking 1.5s ease-in-out infinite;
    margin-bottom: 28px;
}

@keyframes thinking {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.8; }
}

/* Modal input */
.ask-shane-modal-form {
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    padding-top: 14px;
    flex-shrink: 0;
}

.ask-shane-modal-input {
    width: 100%;
    font-family: var(--font-serif);
    font-size: 2rem;
    color: var(--text-color);
    background: transparent;
    border: none;
    outline: none;
    padding: 10px 0;
    min-height: 44px;
}

.ask-shane-modal-input::placeholder {
    color: rgba(0, 0, 0, 0.28);
    font-style: italic;
}

.ask-shane-modal-input:disabled {
    opacity: 0.4;
}

/* Screen reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .ask-shane-bar-input {
        font-size: 3.5rem;
    }

    .starter-link {
        font-size: 2rem;
    }

    .ask-shane-modal-inner {
        padding: 32px 20px 24px;
    }

    .ask-shane-msg-user {
        font-size: 2.4rem;
    }

    .ask-shane-msg-assistant {
        font-size: 2rem;
    }

    .ask-shane-modal-input {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .ask-shane-hero {
        margin-top: 24px;
    }

    .ask-shane-bar-input {
        font-size: 2.8rem;
    }

    .starter-link {
        font-size: 1.8rem;
    }

    .ask-shane-modal-inner {
        padding: 24px 16px 20px;
    }

    .ask-shane-modal-close {
        top: 8px;
        right: -4px;
        font-size: 2.6rem;
    }

    .ask-shane-msg-user {
        font-size: 2.2rem;
    }

    .ask-shane-msg-assistant {
        font-size: 1.8rem;
        line-height: 1.6;
    }

    .ask-shane-modal-input {
        font-size: 1.6rem;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .ask-shane-msg {
        animation: none;
    }

    .ask-shane-thinking {
        animation: none;
        opacity: 0.5;
    }

    .ask-shane-modal {
        transition: none;
    }
}
