/* Church Finder Chatbot Styles */
:root {
    --cfc-primary-color: #f04d23;
    --cfc-secondary-color: #2c3e50;
    --cfc-light-color: #ecf0f1;
    --cfc-dark-color: #34495e;
    --cfc-success-color: #27ae60;
    --cfc-error-color: #e74c3c;
    --cfc-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --cfc-border-radius: 8px;
}

/* Chatbot Container */
#cfc-chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Toggle Button */
#cfc-chatbot-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--cfc-primary-color);
    color: white;
    padding: 8px 14px;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: var(--cfc-shadow);
    transition: all 0.2s ease;
    user-select: none;
}

#cfc-chatbot-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0,0,0,0.14);
}

.cfc-toggle-logo {
    width: 20px;
    height: 20px;
    object-fit: contain;
    display: block;
}

.cfc-toggle-text {
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}

/* Chatbot Window */
#cfc-chatbot-window {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 400px;
    max-width: 90vw;
    background: white;
    border-radius: var(--cfc-border-radius);
    box-shadow: var(--cfc-shadow);
    display: none;
    flex-direction: column;
    max-height: 80vh;
}

#cfc-chatbot-window.cfc-open {
    display: flex;
}

/* Header */
.cfc-chatbot-header {
    background: var(--cfc-primary-color);
    color: white;
    padding: 15px 20px;
    border-radius: var(--cfc-border-radius) var(--cfc-border-radius) 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cfc-chatbot-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

#cfc-close-chatbot {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#cfc-close-chatbot:hover {
    opacity: 0.8;
}

/* Body */
.cfc-chatbot-body {
    padding: 20px;
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cfc-welcome-message {
    background: var(--cfc-light-color);
    padding: 15px;
    border-radius: var(--cfc-border-radius);
    font-size: 14px;
    line-height: 1.5;
}

.cfc-welcome-message p {
    margin: 0;
}

/* Search Form */
.cfc-search-form {
    margin-bottom: 10px;
}

.cfc-input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 8px;
}

#cfc-location-input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: var(--cfc-border-radius);
    font-size: 14px;
    transition: border-color 0.3s;
}

#cfc-location-input:focus {
    outline: none;
    border-color: var(--cfc-primary-color);
}

.cfc-primary-btn {
    background: var(--cfc-primary-color);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: var(--cfc-border-radius);
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.3s;
}

.cfc-primary-btn:hover {
    background: var(--cfc-secondary-color);
}

.cfc-examples small {
    color: #666;
    font-size: 12px;
    display: block;
    margin-top: 5px;
}

/* Loading */
.cfc-loading {
    text-align: center;
    padding: 30px;
}

.cfc-spinner {
    border: 3px solid var(--cfc-light-color);
    border-top: 3px solid var(--cfc-primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: cfc-spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes cfc-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Results */
.cfc-results-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.cfc-result-count {
    font-size: 14px;
    color: var(--cfc-dark-color);
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.cfc-church-card {
    background: white;
    border: 1px solid #eee;
    border-radius: var(--cfc-border-radius);
    padding: 15px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.cfc-church-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.cfc-church-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.cfc-church-name {
    font-weight: 600;
    color: var(--cfc-secondary-color);
    font-size: 16px;
    margin: 0 0 5px 0;
}

.cfc-church-distance {
    background: var(--cfc-primary-color);
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.cfc-church-location {
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
}

.cfc-church-contact {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 13px;
    color: #555;
}

.cfc-contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cfc-contact-item a {
    color: var(--cfc-primary-color);
    text-decoration: none;
}

.cfc-contact-item a:hover {
    text-decoration: underline;
}

.cfc-church-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.cfc-action-btn {
    padding: 6px 12px;
    font-size: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    color: var(--cfc-dark-color);
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s;
}

.cfc-action-btn:hover {
    background: var(--cfc-light-color);
    border-color: var(--cfc-primary-color);
    color: var(--cfc-primary-color);
}

/* Footer */
.cfc-chatbot-footer {
    padding: 10px 20px;
    border-top: 1px solid #eee;
    text-align: center;
    font-size: 12px;
    color: #888;
}

/* Standalone Form */
.cfc-standalone-form {
    max-width: 600px;
    margin: 20px auto;
    padding: 30px;
    background: white;
    border-radius: var(--cfc-border-radius);
    box-shadow: var(--cfc-shadow);
}

.cfc-form-container {
    display: flex;
    gap: 10px;
    margin: 20px 0;
}

.cfc-standalone-input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: var(--cfc-border-radius);
    font-size: 16px;
}

.cfc-standalone-btn {
    background: var(--cfc-primary-color);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: var(--cfc-border-radius);
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
}

.cfc-standalone-btn:hover {
    background: var(--cfc-secondary-color);
}

.cfc-standalone-info {
    margin-top: 10px;
    text-align: center;
    color: #666;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 480px) {
    #cfc-chatbot-window {
        width: calc(100vw - 40px);
        right: -10px;
    }

    .cfc-input-group {
        flex-direction: column;
    }

    .cfc-form-container {
        flex-direction: column;
    }
}
