/**
 * Sarthak Boys Hostel ChatBot - Public CSS
 * Color Scheme: Forest Green (#1B7D3D) and Gold (#D4A537)
 */

/* Chatbot Container */
.dps-edubot-chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 380px;
    height: 600px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 5px 40px rgba(0, 0, 0, 0.16);
    display: flex;
    flex-direction: column;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.dps-edubot-chatbot-container.hidden {
    display: none;
}

/* Chat Header */
.dps-edubot-chat-header {
    background: linear-gradient(135deg, #1B7D3D 0%, #2a9d52 100%);
    color: white;
    padding: 20px;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 3px solid #D4A537;
}

.dps-edubot-chat-header-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dps-edubot-chat-header-title h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.dps-edubot-chat-header-logo {
    width: 40px;
    height: 40px;
    background: #D4A537;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #1B7D3D;
    font-size: 20px;
}

.dps-edubot-chat-header-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0 5px;
    border-radius: 4px;
    transition: background 0.2s;
}

.dps-edubot-chat-header-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Chat Messages Area */
.dps-edubot-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dps-edubot-chat-messages::-webkit-scrollbar {
    width: 6px;
}

.dps-edubot-chat-messages::-webkit-scrollbar-track {
    background: #e9ecef;
}

.dps-edubot-chat-messages::-webkit-scrollbar-thumb {
    background: #1B7D3D;
    border-radius: 3px;
}

/* Chat Message - Bot */
.dps-edubot-message {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    margin-bottom: 8px;
}

.dps-edubot-message.bot {
    justify-content: flex-start;
}

.dps-edubot-message.user {
    justify-content: flex-end;
}

.dps-edubot-message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.dps-edubot-message.bot .dps-edubot-message-avatar {
    background: #D4A537;
    color: #1B7D3D;
}

.dps-edubot-message.user .dps-edubot-message-avatar {
    background: #1B7D3D;
    color: white;
}

.dps-edubot-message-content {
    max-width: 70%;
    padding: 10px 14px;
    border-radius: 8px;
    line-height: 1.4;
    font-size: 14px;
    word-wrap: break-word;
}

.dps-edubot-message.bot .dps-edubot-message-content {
    background: white;
    color: #333;
    border: 1px solid #e0e0e0;
    border-left: 3px solid #1B7D3D;
}

.dps-edubot-message.user .dps-edubot-message-content {
    background: #1B7D3D;
    color: white;
    border-radius: 12px;
}

/* Chat Input Area */
.dps-edubot-chat-input-area {
    padding: 15px;
    border-top: 1px solid #e0e0e0;
    background: white;
    border-radius: 0 0 12px 12px;
}

.dps-edubot-chat-input-form {
    display: flex;
    gap: 8px;
}

.dps-edubot-chat-input {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 14px;
    font-family: inherit;
    resize: none;
    max-height: 100px;
    transition: border-color 0.2s;
}

.dps-edubot-chat-input:focus {
    outline: none;
    border-color: #1B7D3D;
    box-shadow: 0 0 0 3px rgba(27, 125, 61, 0.1);
}

.dps-edubot-chat-submit {
    background: #1B7D3D;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dps-edubot-chat-submit:hover {
    background: #155530;
    box-shadow: 0 2px 8px rgba(27, 125, 61, 0.3);
}

.dps-edubot-chat-submit:active {
    transform: scale(0.98);
}

/* Toggle Button */
.dps-edubot-toggle-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1B7D3D 0%, #2a9d52 100%);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(27, 125, 61, 0.4);
    transition: all 0.3s;
    z-index: 9998;
    pointer-events: auto;
    padding: 0;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.dps-edubot-toggle-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(27, 125, 61, 0.5);
}

.dps-edubot-toggle-btn:active {
    transform: scale(0.95);
}

/* Typing Indicator */
.dps-edubot-typing {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 10px 14px;
}

.dps-edubot-typing span {
    width: 8px;
    height: 8px;
    background: #1B7D3D;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.dps-edubot-typing span:nth-child(2) {
    animation-delay: 0.2s;
}

.dps-edubot-typing span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        opacity: 0.5;
        transform: translateY(0);
    }
    30% {
        opacity: 1;
        transform: translateY(-10px);
    }
}

/* Quick Actions */
.dps-edubot-quick-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.dps-edubot-quick-action-btn {
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-left: 3px solid #D4A537;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    text-align: left;
    transition: all 0.2s;
    color: #333;
}

.dps-edubot-quick-action-btn:hover {
    background: #e8f5e9;
    border-left-color: #1B7D3D;
    color: #1B7D3D;
}

/* Contact Info Badge */
.dps-edubot-contact-info {
    background: #e8f5e9;
    border-left: 4px solid #1B7D3D;
    padding: 10px 12px;
    border-radius: 4px;
    margin: 8px 0;
    font-size: 13px;
}

.dps-edubot-contact-info strong {
    color: #1B7D3D;
}

.dps-edubot-contact-info a {
    color: #1B7D3D;
    text-decoration: none;
    font-weight: 600;
}

.dps-edubot-contact-info a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 480px) {
    .dps-edubot-chatbot-container {
        width: 100%;
        height: 100%;
        position: fixed;
        right: 0;
        bottom: 0;
        border-radius: 0;
        max-width: 100%;
    }

    .dps-edubot-chat-header {
        border-radius: 0;
    }

    .dps-edubot-message-content {
        max-width: 85%;
    }
}

/* Loading State */
.dps-edubot-loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Error State */
.dps-edubot-error {
    background: #ffebee;
    border-left: 4px solid #d32f2f;
    padding: 10px 12px;
    border-radius: 4px;
    color: #c62828;
    font-size: 13px;
    margin: 8px 0;
}
