/* 
   Body Art Council - Main Stylesheet
   This file defines the custom look of your website.
*/

/* ===== 1. ROOT VARIABLES (Your Brand Colors) ===== */
:root {
    --primary: #2a2d7a;      /* Deep, trustworthy blue */
    --primary-dark: #1f2259;
    --secondary: #d32f2f;    /* Energetic, bold red */
    --accent: #ff9800;       /* Warm, friendly orange */
    --dark: #1a1a2e;         /* Near-black for backgrounds */
    --light: #f8f9fa;        /* Off-white for sections */
    --success: #28a745;      /* Green (already used by Bootstrap) */
    --gold: #d4af37;         /* Gold for Patron tier */
}

/* ===== 2. GLOBAL STYLES ===== */
body {
    font-family: 'Roboto', sans-serif;
    color: #333;
    padding-top: 76px; /* Prevents content from hiding under fixed navbar */
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--dark);
    font-family: 'Poppins', sans-serif;
}

/* Links */
a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease;
}
a:hover {
    color: var(--secondary);
}

/* ===== 3. COMPONENT OVERRIDES ===== */

/* 3.1 Navigation Bar */
.navbar-dark.bg-dark {
    background-color: var(--dark) !important;
    border-bottom: 3px solid var(--secondary);
}
.navbar-brand {
    font-size: 1.8rem;
    font-weight: 800;
}
.nav-link {
    font-weight: 500;
    margin: 0 5px;
    border-radius: 4px;
}
.nav-link:hover, .nav-link.active {
    background-color: rgba(255, 255, 255, 0.1);
    color: white !important;
}

/* 3.2 Buttons */
.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
}
.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}
.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
}
.btn-outline-primary:hover {
    background-color: var(--primary);
    border-color: var(--primary);
}
.btn-success {
    background-color: var(--success);
    border-color: var(--success);
}
.btn-warning {
    background-color: var(--gold);
    border-color: var(--gold);
    color: #000;
}

/* 3.3 Hero Section */
.hero-section {
    background: linear-gradient(rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.9));
    background-size: cover;
    border-bottom: 5px solid var(--secondary);
}

/* 3.4 Cards (Used on Membership Page) */
.card {
    border-radius: 10px;
    overflow: hidden; /* Makes corners match */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important;
}
.card-header {
    font-size: 1.4rem;
    padding: 1rem 1.5rem;
}

/* 3.5 Candice Chatbot Placeholder */
.chatbot-placeholder {
    background: linear-gradient(135deg, var(--dark) 0%, #2d2d4d 100%);
    border-left: 5px solid var(--accent);
}

/* 3.6 Footer */
footer {
    border-top: 5px solid var(--secondary);
    margin-top: 3rem;
}

/* ===== 4. CANDICE WIDGET STYLES ===== */

/* 4.1 Widget Container */
#candice-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

/* 4.2 Toggle Button */
.candice-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary);
    border: 3px solid white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.candice-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

.candice-pulse {
    position: absolute;
    width: 70px;
    height: 70px;
    background: rgba(42, 45, 122, 0.3);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.9); opacity: 0.7; }
    70% { transform: scale(1.1); opacity: 0; }
    100% { transform: scale(0.9); opacity: 0; }
}

/* 4.3 Chat Window */
.candice-chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    display: none;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #ddd;
    z-index: 1002;
}

.candice-chat-window.active {
    display: flex;
}

/* 4.4 Chat Header */
.candice-header {
    background: var(--primary);
    color: white;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.candice-header img {
    border-radius: 50%;
    border: 2px solid white;
}

.candice-header h6 {
    margin: 0;
    font-weight: bold;
}

.candice-header small {
    opacity: 0.9;
    font-size: 0.8rem;
}

.candice-status {
    font-size: 0.75rem;
    margin-top: 3px;
}

.candice-status.online {
    color: #4CAF50;
}

/* 4.5 Chat Messages */
.candice-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background: #f8f9fa;
}

.message {
    margin-bottom: 15px;
    padding: 12px 15px;
    border-radius: 15px;
    max-width: 85%;
}

.candice-message {
    background: white;
    border: 1px solid #e0e0e0;
    border-top-left-radius: 5px;
}

.user-message {
    background: var(--primary);
    color: white;
    margin-left: auto;
    border-top-right-radius: 5px;
}

/* 4.6 Quick Questions */
.candice-quick-questions {
    padding: 10px 15px;
    border-top: 1px solid #eee;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    background: white;
}

.quick-btn {
    padding: 6px 12px;
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.quick-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* 4.7 Input Area */
.candice-input {
    padding: 15px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
    background: white;
}

#candice-input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 25px;
    outline: none;
}

#candice-input:focus {
    border-color: var(--primary);
}

#candice-send {
    padding: 10px 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: background 0.3s;
}

#candice-send:hover {
    background: var(--primary-dark);
}

/* 4.8 Chat Footer */
.candice-footer {
    padding: 10px 15px;
    background: #f8f9fa;
    border-top: 1px solid #eee;
    text-align: center;
    font-size: 0.75rem;
    color: #666;
}

.candice-footer a {
    color: var(--primary);
    text-decoration: none;
}

/* ===== 5. COMPACT SPEECH BUBBLE STYLES ===== */

.candice-speech-bubble {
    position: absolute;
    bottom: 70px; /* Raised higher above the button */
    right: 0;
    background: var(--primary);
    color: white;
    padding: 10px 12px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(42, 45, 122, 0.3);
    width: 160px; /* Smaller width */
    z-index: 1001;
    display: none;
    font-family: 'Roboto', sans-serif;
    font-size: 0.8rem;
    line-height: 1.3;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.candice-speech-bubble.active {
    display: block;
    animation: slideInBubble 0.3s ease-out;
}

@keyframes slideInBubble {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.speech-content {
    text-align: center;
}

.speech-content p {
    margin: 0 0 6px 0;
    font-weight: 600;
    font-size: 0.85rem;
    color: white;
}

.speech-content ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.speech-content li {
    margin-bottom: 3px;
    padding-left: 0;
    font-size: 0.75rem;
    opacity: 0.9;
    position: relative;
    padding-left: 12px;
}

.speech-content li:before {
    content: "→";
    position: absolute;
    left: 0;
    font-size: 0.7rem;
    opacity: 0.7;
}

.speech-arrow {
    position: absolute;
    bottom: -8px;
    right: 15px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid var(--primary);
}

/* Subtle pulsing animation */
@keyframes subtlePulse {
    0%, 100% { 
        box-shadow: 0 4px 15px rgba(42, 45, 122, 0.3);
    }
    50% { 
        box-shadow: 0 4px 20px rgba(42, 45, 122, 0.4);
    }
}

.candice-speech-bubble.active {
    animation: slideInBubble 0.3s ease-out, subtlePulse 2s ease-in-out infinite;
}

/* ===== 6. RESPONSIVE STYLES ===== */

@media (max-width: 768px) {
    .candice-chat-window {
        width: 300px;
        height: 450px;
        bottom: 70px;
        right: 10px;
    }
    
    .candice-btn {
        width: 50px;
        height: 50px;
    }
    
    .candice-speech-bubble {
        width: 140px;
        bottom: 65px;
        padding: 8px 10px;
    }
    
    .speech-content p {
        font-size: 0.8rem;
    }
    
    .speech-content li {
        font-size: 0.7rem;
    }
    
    .speech-arrow {
        right: 10px;
        bottom: -7px;
    }
}

@media (max-width: 480px) {
    .candice-speech-bubble {
        width: 130px;
        bottom: 60px;
    }
    
    .speech-content p {
        font-size: 0.75rem;
    }
    
    .speech-content li {
        font-size: 0.65rem;
    }
}

/* Additional responsive adjustments */
@media (max-width: 576px) {
    .hero-section .btn-lg {
        padding: 0.5rem 1rem;
        font-size: 1rem;
        margin: 5px;
    }
    
    .display-4 {
        font-size: 2.5rem;
    }
}