/* ----------------------------------------------------
   GLOBAL BASE STYLES
---------------------------------------------------- */

:root {
    --bg: #f8f8f8;
    --card: #ffffff;
    --border: #e5e5e5;
    --text: #1d1d1f;
    --text-light: #666;
    --blue: #007aff;
    --radius: 14px;
    --shadow: 0 8px 28px rgba(0,0,0,0.06);
}

body {
    background: var(--bg);
    font-family: -apple-system, BlinkMacSystemFont, "Inter", "Helvetica Neue", system-ui, sans-serif;
    color: var(--text);
}

.gw-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
}

.gw-page-title {
    font-size: 34px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.4px;
    margin-bottom: 20px;
    text-align: center;
}










/* ----------------------------------------------------
   TOP NAV — FLOATING ICON BAR
---------------------------------------------------- */

#clinician-top-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 14px 24px;
    background: transparent !important;
    backdrop-filter: none !important;
    border: none !important;
    box-shadow: none !important;
}

.apple-top-icons {
    display: flex;
    align-items: center;
    gap: 18px;
}

.apple-icon-btn {
    background: rgba(255,255,255,0.35);
    border: 1px solid rgba(0,0,0,0.08);
    padding: 8px 10px;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
    transition: background 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
}

.apple-icon-btn:hover {
    background: rgba(255,255,255,0.55);
    opacity: 0.9;
    transform: translateY(-1px);
}

.apple-icon-btn:active {
    transform: scale(0.96);
}

.top-icon {
    width: 20px;
    height: 20px;
    color: var(--blue);
    display: block;
}










/* ----------------------------------------------------
   PANELS
---------------------------------------------------- */

.gw-panel {
    background: rgba(255,255,255,0.75);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: var(--radius);
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}

.gw-panel h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--blue);
    margin-bottom: 18px;
}

.gw-panel label {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 6px;
    display: block;
    color: var(--text);
}

.gw-panel input,
.gw-panel select,
.gw-panel textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: var(--radius);
    font-size: 15px;
    margin-bottom: 18px;
    background: #fafafa;
}

.gw-panel .gw-btn {
    width: 100%;
    padding: 13px;
    font-size: 16px;
    border-radius: var(--radius);
    background: var(--blue);
    color: #fff;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.gw-panel .gw-btn:hover {
    background: #0062cc;
}










/* ----------------------------------------------------
   MESSAGES
---------------------------------------------------- */

.gw-message {
    margin-top: 12px;
    font-size: 14px;
    padding: 10px 12px;
    border-radius: 8px;
}

.gw-message.error {
    background: #ffe5e5;
    color: #b30000;
    border: 1px solid #ffcccc;
}

.gw-message.success {
    background: #e6f7e6;
    color: #006600;
    border: 1px solid #cceccc;
}










/* ----------------------------------------------------
   SLIDE PANELS
---------------------------------------------------- */

.slide-panel {
    display: none;
    background: rgba(255,255,255,0.75);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    transition: all 0.25s ease;
    transform-origin: top;
}












/* ----------------------------------------------------
   CHAT FEED
---------------------------------------------------- */

.chat-post {
    padding: 16px 0;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    margin-bottom: 10px;
    overflow-wrap: break-word;
}

.chat-post-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.chat-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

.chat-author {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin-right: auto;
}

.chat-timestamp {
    font-size: 12px;
    color: #666;
    font-weight: 400;
}

.chat-post-replying {
    font-size: 13px;
    color: #666;
    margin-bottom: 6px;
}

.chat-post-content {
    font-size: 15px;
    line-height: 1.6;
    color: #222;
    margin: 2px 0 8px 0;
}













/* ----------------------------------------------------
   POST A MESSAGE
---------------------------------------------------- */

.gw-chat-box {
    background: rgba(255,255,255,0.75);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 22px;
    box-shadow: var(--shadow);
}

.gw-chat-box label {
    font-size: 16px;
    font-weight: 600;
    color: var(--blue);
    margin-bottom: 12px;
}

#chat-post-content {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: var(--radius);
    font-size: 15px;
    line-height: 1.5;
    resize: vertical;
    min-height: 110px;
}

#chat-post-btn {
    margin-top: 14px;
    width: 100%;
    padding: 13px;
    font-size: 16px;
    border-radius: var(--radius);
}












/* ----------------------------------------------------
   COMMENTS MODAL — FIXED + MOBILE RESPONSIVE
---------------------------------------------------- */

#chat-comments-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    width: 480px;
    max-width: 92%;
    max-height: 80vh; /* stays inside viewport */
    overflow-y: auto;

    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(22px);
    border: 1px solid rgba(0,0,0,0.06);
    padding: 24px;
    border-radius: 18px;
    box-shadow: 0 18px 40px rgba(0,0,0,0.18);
    z-index: 9999;
    display: none;
}


.chat-comment {
    padding: 14px 0;
    border-bottom: 1px solid rgba(0,0,0,0.08);
}

.original-comment {
    background: rgba(249,249,249,0.9);
    border: 1px solid rgba(0,0,0,0.06);
    padding: 16px;
    border-radius: var(--radius);
    margin-bottom: 14px;
}

#chat-comments-container .chat-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}











/* ----------------------------------------------------
   MODAL COMMENT ACTIONS — LIKE + REPLY
---------------------------------------------------- */

#chat-comments-container .comment-actions {
    display: flex;
    gap: 16px;
    margin-top: 8px;
}

#chat-comments-container .comment-actions button {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    background: rgba(255,255,255,0.45);
    backdrop-filter: blur(10px);

    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 20px;

    padding: 6px 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--blue);

    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
}

#chat-comments-container .comment-actions button:hover {
    background: rgba(255,255,255,0.65);
    transform: translateY(-1px);
}

#chat-comments-container .comment-actions button:active {
    transform: scale(0.96);
}












/* ----------------------------------------------------
   REPLY PANEL BUTTONS
---------------------------------------------------- */

#chat-comments-container .reply-actions {
    display: flex;
    gap: 12px;
    margin-top: 18px;
}

#chat-comments-container .reply-btn {
    flex: 1;
    padding: 12px;
    font-size: 15px;
    font-weight: 600;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
}

#chat-comments-container .reply-btn.post {
    background: var(--blue);
    color: #fff;
}

#chat-comments-container .reply-btn.post:hover {
    background: #0062cc;
    transform: translateY(-1px);
}

#chat-comments-container .reply-btn.close {
    background: rgba(0,0,0,0.05);
    color: var(--text);
}

#chat-comments-container .reply-btn.close:hover {
    background: rgba(0,0,0,0.08);
    transform: translateY(-1px);
}















/* ----------------------------------------------------
   PROFILE PANEL
---------------------------------------------------- */

#profile-slide {
    padding: 28px;
    margin-top: 20px;
    background: rgba(255,255,255,0.92);
    border-radius: var(--radius);
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 14px 34px rgba(0,0,0,0.14);
    backdrop-filter: blur(24px);
}

#profile-slide img {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    margin: 0 auto 16px auto;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

#profile-slide input[type="file"] {
    margin: 12px auto 24px auto;
    display: block;
    font-size: 14px;
}

#profile-slide .profile-field {
    background: rgba(245,245,245,0.9);
    border: 1px solid rgba(0,0,0,0.06);
    padding: 14px 16px;
    border-radius: var(--radius);
    margin-bottom: 12px;
}

#profile-slide .profile-field strong {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 4px;
}

#profile-slide .profile-field span {
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
}















/* ----------------------------------------------------
   LIKE + REPLY ICONS
---------------------------------------------------- */

.chat-post-actions {
    margin-top: 6px;
    display: flex;
    gap: 18px;
    align-items: center;
}

.chat-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 15px;
    color: var(--blue);
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    line-height: 1;
    font-weight: 500;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.chat-action:hover {
    opacity: 0.7;
    transform: translateY(-1px);
}

.chat-action-icon {
    width: 18px;
    height: 18px;
    display: inline-block;
    color: var(--blue);
    flex-shrink: 0;
}

.chat-action-count {
    font-size: 14px;
    color: var(--blue);
    font-weight: 500;
}














/* ----------------------------------------------------
   OUTBREAK PANEL
---------------------------------------------------- */

#outbreak-slide {
    padding: 26px;
    margin-top: 20px;
    background: rgba(255,255,255,0.92);
    border-radius: var(--radius);
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 14px 34px rgba(0,0,0,0.14);
    backdrop-filter: blur(24px);
}

#outbreak-slide h3 {
    font-size: 22px;
    font-weight: 700;
    color: var(--blue);
    margin-bottom: 18px;
}

#outbreak-slide label {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
    display: block;
}

#outbreak-slide input,
#outbreak-slide select,
#outbreak-slide textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: var(--radius);
    font-size: 15px;
    background: #fafafa;
    margin-bottom: 18px;
}

#outbreak-slide button.gw-btn {
    width: 100%;
    padding: 13px;
    font-size: 16px;
    border-radius: var(--radius);
    background: var(--blue);
    color: #fff;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

#outbreak-slide button.gw-btn:hover {
    background: #0062cc;
}

#outbreak-slide h3 + div {
    margin-top: 20px;
}

#outbreak-slide p {
    font-size: 15px;
    color: var(--text-light);
}












/* ----------------------------------------------------
   MOBILE OVERRIDES
---------------------------------------------------- */

@media (max-width: 600px) {
    #new-post-btn {
        bottom: 18px;
        right: 18px;
        width: 54px;
        height: 54px;
        font-size: 26px;
    }

    #chat-comments-container {
        top: 0 !important;
        left: 0 !important;
        transform: none !important;
        width: 100% !important;
        height: 100vh !important;
        border-radius: 0 !important;
        padding: 24px !important;
    }
}

.gw-link-btn {
    background: none;
    border: none;
    color: var(--blue);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    padding: 6px 0;
    display: inline-block;
    text-align: left;
}

.gw-link-btn:hover {
    opacity: 0.7;
    text-decoration: underline;
}

.gw-link-btn:active {
    opacity: 0.5;
}















/* ----------------------------------------------------
   REPLY BOX — BEAUTIFUL, CLEAN, MATCHES UI
---------------------------------------------------- */

#chat-comments-container textarea {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    line-height: 1.5;
    border-radius: var(--radius);
    border: 1px solid rgba(0,0,0,0.12);
    background: rgba(255,255,255,0.65);
    backdrop-filter: blur(14px);
    resize: vertical;
    min-height: 110px;
    margin-top: 12px;
    margin-bottom: 18px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

#chat-comments-container textarea:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 2px rgba(0,122,255,0.25);
}

/* Buttons */
#chat-comments-container .reply-actions {
    display: flex;
    gap: 12px;
    margin-top: 10px;
}

#chat-comments-container .reply-btn {
    flex: 1;
    padding: 12px;
    font-size: 15px;
    font-weight: 600;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
}

/* Post button */
#chat-comments-container .reply-btn.post {
    background: var(--blue);
    color: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

#chat-comments-container .reply-btn.post:hover {
    background: #0062cc;
    transform: translateY(-1px);
}

/* Close button */
#chat-comments-container .reply-btn.close {
    background: rgba(0,0,0,0.05);
    color: var(--text);
}

#chat-comments-container .reply-btn.close:hover {
    background: rgba(0,0,0,0.08);
    transform: translateY(-1px);
}


.notif-wrapper {
    position: relative;
}



/* Mentions dropdown container */
.mentions-dropdown {
    position: absolute;
    top: 40px;
    left: 0;
    width: 260px;
    padding: 12px;
    border-radius: 14px;

    /* Glass effect */
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(14px) saturate(180%);
    -webkit-backdrop-filter: blur(14px) saturate(180%);

    /* Border + shadow */
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);

    /* Animation */
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.25s ease, transform 0.25s ease;

    z-index: 9999;
}

/* When visible */
.mentions-dropdown.show {
    opacity: 1;
    transform: translateY(0);
}













/* Mention item */
.mention-item {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 8px 10px;
    margin-bottom: 8px;

    border-radius: 10px;
    background: rgba(255,255,255,0.45);
    backdrop-filter: blur(10px);
    cursor: pointer;

    transition: background 0.2s ease;
}

.mention-item:hover {
    background: rgba(255,255,255,0.65);
}

/* Mention name */
.mention-name {
    font-weight: 600;
    color: #003366;
}

/* Add button (pill style) */
.mention-add-btn {
    padding: 4px 12px;
    border-radius: 20px;
    border: none;

    background: #007bff;
    color: white;
    font-size: 12px;
    font-weight: 600;

    cursor: pointer;
    transition: background 0.2s ease;
}

.mention-add-btn:hover {
    background: #005fcc;
}


.notif-panel {
    position: absolute;
    right: 0;
    top: 40px;
    width: 280px;
    padding: 16px;
    border-radius: 14px;
    max-height: 70vh;      /* keeps panel inside viewport */
    overflow-y: auto;      /* enables scrolling */

    /* Glass effect */
    background: rgba(255,255,255,0.25);
    backdrop-filter: blur(14px) saturate(180%);
    -webkit-backdrop-filter: blur(14px) saturate(180%);

    /* Border + shadow */
    border: 1px solid rgba(255,255,255,0.35);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);

    /* Animation */
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.25s ease, transform 0.25s ease;

    z-index: 9999;
}

.notif-panel.show {
    opacity: 1;
    transform: translateY(0);
}

.notif-panel h3 {
    margin-top: 0;
    font-size: 16px;
    font-weight: 600;
    color: #003366;
}

#notifList > div {
    background: rgba(255,255,255,0.45);
    backdrop-filter: blur(10px);
    padding: 10px 12px;
    border-radius: 10px;
    margin-bottom: 10px;
}

#notifList button {
    margin-top: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    background: #007bff;
    color: #fff;
    border: none;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}












/* ----------------------------------------------------
   THREADED COMMENTS — INDENT + VISUAL TREE
---------------------------------------------------- */

#chat-comments-container .chat-comment {
    position: relative;
    padding: 14px 0 14px 0;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    margin-bottom: 4px;
}

/* Optional: subtle vertical line for nested replies */
#chat-comments-container .chat-comment::before {
    content: "";
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    border-left: 2px solid rgba(0,0,0,0.06);
    opacity: 0.7;
}











/* Avatar + text inside threaded comments already use inline styles from JS */


.gw-profile-image-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    background: #0077cc;
    color: #fff;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: background 0.2s ease, transform 0.1s ease;
    margin-top: 10px;
}

.gw-profile-image-btn:hover {
    background: #005fa3;
}

.gw-profile-image-btn:active {
    transform: scale(0.97);
}

.gw-profile-image-btn input {
    display: none;
}

.chat-comment.reply-target {
    background: rgba(0, 122, 255, 0.08);
    border-radius: 8px;
    padding: 6px;
}

#replying-indicator {
    font-size: 14px;
    color: var(--blue);
    font-weight: 600;
    margin: 6px 0 10px 0;
    padding: 6px 10px;
    background: rgba(0, 122, 255, 0.08);
    border-radius: 8px;
}



.link-preview-card {
    display: block;
    border: 1px solid #e2e2e2;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 10px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.link-preview-card:hover {
    box-shadow: 0 3px 8px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.link-preview-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.link-preview-image {
    width: 100%;
    height: 180px;
    background-size: cover;
    background-position: center;
    background-color: #f3f3f3;
}

.link-preview-text {
    padding: 12px 14px;
}

.link-preview-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #222;
}

.link-preview-description {
    font-size: 14px;
    color: #555;
    margin-bottom: 8px;
    line-height: 1.4;
}

.link-preview-url {
    font-size: 13px;
    color: #0077cc;
    word-break: break-all;
}

.clinician-link {
    cursor: pointer;
    color: #0073e6;
}

.clinician-link:hover {
    text-decoration: underline;
}








/* ----------------------------------------------------
   CLINICIAN MODAL — GLASSY, CENTERED, BEAUTIFUL
---------------------------------------------------- */

/* Backdrop */
#clinician-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    display: flex;
    justify-content: center;
    align-items: center;

    z-index: 99999;
}

/* Modal content */
.gw-modal-content {
    background: rgba(255,255,255,0.25);
    backdrop-filter: blur(22px) saturate(180%);
    -webkit-backdrop-filter: blur(22px) saturate(180%);

    border: 1px solid rgba(255,255,255,0.35);
    border-radius: 20px;

    width: 90%;
    max-width: 480px;
    padding: 32px;

    box-shadow:
        0 18px 40px rgba(0,0,0,0.25),
        0 0 0 1px rgba(255,255,255,0.4) inset;

    position: relative;
    animation: modalLift 0.28s ease-out;
}

/* Close button */
.gw-modal-close {
    position: absolute;
    top: 14px;
    right: 18px;
    font-size: 30px;
    cursor: pointer;
    color: #666;
    transition: opacity 0.15s ease;
}

.gw-modal-close:hover {
    opacity: 0.7;
}

/* Avatar */
#clinician-modal-body img {
    width: 120px !important;
    height: 120px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    display: block !important;
    margin: 0 auto 20px auto !important;
}

/* Center text */
#clinician-modal-body {
    text-align: center;
}

/* Animation */
@keyframes modalLift {
    from {
        opacity: 0;
        transform: translateY(14px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}






/* ----------------------------------------------------
   VISIBILITY FIXES
---------------------------------------------------- */

#clinician-dashboard-panel:not([hidden]),
#clinician-login-panel:not([hidden]),
#clinician-register-panel:not([hidden]),
#clinician-verify-panel:not([hidden]) {
    display: block !important;
}

.clinician-dashboard {
    display: block !important;
}

.notif-panel {
    pointer-events: none;
}

.notif-panel.show {
    pointer-events: auto;
}

#profile-slide #clinician-profile-image-input {
    display: none !important;
}

#profile-slide .gw-profile-image-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;

    /* Override inherited label styles */
    margin: 10px auto !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #fff !important;

    /* Button styling */
    padding: 10px 16px;
    background: #0077cc;
    border-radius: 6px;
    cursor: pointer;
    border: none;
    transition: background 0.2s ease, transform 0.1s ease;
}



