/*
Theme Name: Branson-Hollister Lions Club
Author: David Thomas
Description: A custom theme built with Tailwind CSS for the Branson-Hollister Lions Club.
Version: 1.0
*/

/* Import Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&family=Merriweather:ital,wght@0,400;0,700;1,400&display=swap');

/* Variables */
:root {
    /* Lions Club Standard Colors */
    --primary: #00338D; /* Lions Blue */
    --secondary: #FFC72C; /* Lions Gold */
}

/* Global Styles */
body {
    font-family: 'Inter', sans-serif;
    scroll-behavior: smooth;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Merriweather', serif;
}

/* Utility Helpers */
.text-on-gold { color: #000000; }
.bg-lions-blue { background-color: var(--primary); }
.text-lions-blue { color: var(--primary); }
.bg-lions-gold { background-color: var(--secondary); }
.text-lions-gold { color: var(--secondary); }
.border-lions-gold { border-color: var(--secondary); }

/* Mobile Menu Transitions */
#mobile-menu {
    transition: max-height 0.3s ease-in-out;
    max-height: 0;
    overflow: hidden;
}
#mobile-menu.open {
    max-height: 600px;
}

/* Member Login Form Styling */
.custom-login-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #374151;
}

.custom-login-form input[type="text"], 
.custom-login-form input[type="password"] {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.custom-login-form input[type="submit"] {
    width: 100%;
    background-color: var(--primary);
    color: white;
    font-weight: bold;
    padding: 0.75rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.custom-login-form input[type="submit"]:hover {
    background-color: #1e40af;
}

.custom-login-form .login-remember {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* -------------------------------------------------------------------------- */
/* NATIVE CHAT STYLES (WordPress Comments as Chat)                            */
/* -------------------------------------------------------------------------- */

/* Chat Container */
.chat-window-container {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
}

/* Messages Box (Scrollable area) */
.chat-messages-box {
    background-color: #f9fafb;
    height: 500px;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Generic Message Wrapper */
.chat-message {
    display: flex;
    flex-direction: column;
    max-width: 80%;
}

/* My Messages (Right Aligned, Blue) */
.chat-me {
    align-self: flex-end;
    align-items: flex-end;
}

.chat-me .chat-bubble {
    background-color: var(--primary); /* Lions Blue */
    color: white;
    border-bottom-right-radius: 0;
}

.chat-me .chat-meta {
    text-align: right;
    color: #e5e7eb; /* Lighter text for time */
}

/* Others Messages (Left Aligned, Gray) */
.chat-others {
    align-self: flex-start;
    align-items: flex-start;
}

.chat-others .chat-bubble {
    background-color: #e5e7eb; /* Light Gray */
    color: #1f2937;
    border-bottom-left-radius: 0;
}

.chat-others .chat-meta {
    color: #6b7280;
}

/* Bubble Styling */
.chat-bubble {
    padding: 12px 16px;
    border-radius: 16px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    position: relative;
    font-size: 0.95rem;
    line-height: 1.5;
    
    /* FIX: Force wrapping and preserve new lines */
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
}

.chat-text {
    white-space: pre-wrap; /* Preserves returns/new lines from the textarea */
}

/* Meta Data (Name & Time) */
.chat-meta {
    font-size: 0.7rem;
    margin-bottom: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Chat Input Area */
.chat-input-area {
    padding: 15px;
    background: white;
    border-top: 1px solid #e5e7eb;
}

/* FORM LAYOUT - FLEXBOX ROW */
.chat-form-flex {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    width: 100%;
}

/* Force standard WordPress comment containers to behave */
.chat-form-flex .comment-form-comment {
    flex-grow: 1;
    margin-bottom: 0;
}

.chat-form-flex .form-submit {
    margin: 0;
    width: auto;
}

/* Textarea Styling */
.chat-textarea {
    width: 100%;
    min-height: 50px; /* Start size */
    max-height: 110px; /* Cap at ~3-4 lines, then scroll */
    padding: 10px 15px;
    border: 2px solid #e5e7eb;
    border-radius: 20px; /* Slightly less pill-shaped for multi-line */
    resize: none;
    font-family: inherit;
    transition: border-color 0.2s;
    margin-bottom: 0; /* Remove default margin */
    line-height: 1.4;
    overflow-y: auto; /* Scrollbar appears when max-height is reached */
}

.chat-textarea:focus {
    outline: none;
    border-color: var(--primary);
}

/* Submit Button Styling */
.chat-submit-btn {
    height: 50px; /* Match textarea height */
    background-color: var(--primary) !important; /* Lions Blue */
    color: white !important;
    font-weight: bold;
    padding: 0 24px;
    border: none;
    border-radius: 25px; /* Pill shape */
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    margin: 0 !important; /* Remove default margin */
}

.chat-submit-btn:hover {
    background-color: #1e40af !important; /* Darker Blue */
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* -------------------------------------------------------------------------- */
/* EVENTS CALENDAR STYLES                                                     */
/* -------------------------------------------------------------------------- */

.calendar-grid {
    border: 1px solid #e5e7eb;
}

/* Day Cell Base */
.calendar-day {
    transition: background-color 0.2s ease;
}

/* Highlighted Event Days */
.calendar-day.has-event {
    background-color: #fffbeb; /* Light Yellow */
}

.calendar-day.has-event:hover {
    background-color: #fef3c7; /* Darker Yellow on hover */
}

/* Today indicator */
.calendar-day .text-lions-blue.bg-blue-200 {
    background-color: #dbeafe;
    color: var(--primary);
}

/* Modal Animation classes (used in JS) */
.scale-95 { transform: scale(0.95); opacity: 0; }
.scale-100 { transform: scale(1); opacity: 1; }
#modal-content-box { transition: all 0.2s ease-out; }