/* app/static/css/style.css */
/* Consolidated styles from all templates */

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #10b981;
    --warning-color: #F8BE3B;
    --danger-color: #ef4444;
    --dark-color: #1e293b;
    --light-color: #f8fafc;
}

/* ========== GENERAL STYLES ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: var(--light-color);
    color: #333;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: var(--dark-color);
}

/* ========== NAVIGATION ========== */
.navbar {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: 700;
    color: var(--primary-color) !important;
}

.nav-link {
    font-weight: 500;
    color: #64748b !important;
    padding: 8px 16px !important;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-color) !important;
    background: rgba(102, 126, 234, 0.1);
}

/* ========== BUTTONS ========== */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: none;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.btn-outline-light {
    border: 2px solid white;
    color: white;
}

.btn-outline-light:hover {
    background: white;
    color: var(--primary-color);
}

.btn-light {
    background: white;
    color: var(--primary-color);
}

.btn-light:hover {
    background: #f8f9fa;
    color: var(--primary-color);
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
}

/* ========== CARDS ========== */
.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.feature-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    height: 100%;
    border: 1px solid #e5e7eb;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    width: 70px;
    height: 70px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.feature-icon i {
    font-size: 30px;
    color: var(--primary-color);
}

.procedure-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
}

.procedure-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

.stats-counter {
    text-align: center;
    padding: 40px 20px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.counter-number {
    font-size: 48px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.counter-label {
    color: #64748b;
    font-size: 16px;
    font-weight: 500;
}

/* ========== FORM STYLES ========== */
.form-control {
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px 15px;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.form-check-label {
    cursor: pointer;
}

.input-group-text {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
}

/* ========== HERO SECTION ========== */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23ffffff' fill-opacity='0.1' fill-rule='evenodd'/%3E%3C/svg%3E");
    opacity: 0.1;
}

/* ========== FOOTER ========== */
.footer {
    background: #1e293b;
    color: white;
    padding: 50px 0;
    margin-top: 100px;
}

/* ========== CHAT STYLES ========== */
.chat-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 500px;
    height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-header {
    background: linear-gradient(135deg, #F8BE3B 0%, #efb93f 100%);
    color: white;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.chat-header-text {
    text-align: left;
}

.chat-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

.chat-header p {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-top: 5px;
}

.clear-chat-button {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 8px 12px;
    border-radius: 18px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.clear-chat-button:hover {
    background: rgba(255, 255, 255, 0.35);
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 18px;
    line-height: 1.4;
    word-wrap: break-word;
    white-space: pre-line;
}

.bot-message {
    background: #f0f2f5;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.user-message {
    background: linear-gradient(135deg, #F8BE3B 0%, #efb93f 100%);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.buttons-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.button {
    background: linear-gradient(135deg, #F8BE3B 0%, #efb93f 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.button:hover {
    background: linear-gradient(135deg, #F8BE3B 0%, #efb93f 100%);
    transform: translateY(-2px);
    opacity: 0.9;
}

.input-container {
    padding: 20px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 10px;
}

.input-container input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 25px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.input-container input:focus {
    border-color: #F8BE3B;
}

.input-container button {
    background: linear-gradient(135deg, #F8BE3B 0%, #efb93f 100%);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.input-container button:hover {
    background: linear-gradient(135deg, #F8BE3B 0%, #efb93f 100%);
    transform: scale(1.05);
    opacity: 0.9;
}

.payment-link, .calendly-link {
    display: inline-block;
    background: #10b981;
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    margin: 10px 0 14px;
    transition: all 0.3s ease;
}

.payment-link:hover, .calendly-link:hover {
    background: #059669;
    transform: translateY(-2px);
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #F8BE3B;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Welcome Screen */
.welcome-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    height: 100%;
}

.welcome-screen.hidden {
    display: none;
}

.welcome-logo {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #F8BE3B 0%, #efb93f 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(245, 158, 11, 0.3);
    padding: 0px 5px 10px 5px;
}

.welcome-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 20px;
    line-height: 1.3;
}

.welcome-subtitle {
    font-size: 0.95rem;
    color: #6b7280;
    margin-bottom: 20px;
    font-weight: 500;
}

.welcome-description {
    font-size: 0.9rem;
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 40px;
    max-width: 350px;
}

.welcome-cta {
    background: linear-gradient(135deg, #F8BE3B 0%, #efb93f 100%);
    color: #000;
    border: none;
    padding: 14px 40px;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(245, 158, 11, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.welcome-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(245, 158, 11, 0.4);
}

.welcome-cta:active {
    transform: translateY(0);
}

.welcome-icon {
    font-size: 1.3rem;
}

/* Chat area - initially hidden welcome screen */
.chat-area {
    display: none;
}

.chat-area.active {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* ========== PAYMENT PAGE ========== */
.payment-container {
    max-width: 800px;
    margin: 50px auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.payment-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: #000;
    padding: 30px;
    text-align: center;
}

.payment-body {
    padding: 40px;
}

.payment-info {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
}

.braintree-hosted-fields-focused {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25) !important;
}

.braintree-hosted-fields-invalid {
    border-color: #dc3545 !important;
}

.form-group {
    margin-bottom: 25px;
}

.payment-btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 16px;
    width: 100%;
    transition: all 0.3s ease;
}

.payment-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.payment-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.secure-badge {
    background: #10b981;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

.payment-methods {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.payment-method {
    flex: 1;
    text-align: center;
    padding: 15px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.payment-method:hover {
    border-color: var(--primary-color);
}

.payment-method.active {
    border-color: var(--primary-color);
    background: rgba(102, 126, 234, 0.1);
}

.card-logos {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 10px;
}

.card-logo {
    height: 30px;
    opacity: 0.7;
}

/* Restart button styles */
.restart-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    max-width: 250px;
    margin: 20px auto;
    padding: 12px 24px;
    background: linear-gradient(135deg, #F8BE3B 0%, #ff9d4d 100%);
    color: #000;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(249, 121, 21, 0.2);
}

.restart-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(249, 121, 21, 0.3);
    background: linear-gradient(135deg, #F8BE3B 0%, #efb93f 100%);
}

.restart-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.restart-icon {
    font-size: 16px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Small loading indicator for button */
.small-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    margin: 0 auto;
}


/* ========== ANIMATIONS ========== */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .chat-container {
        height: 90vh;
        border-radius: 10px;
        max-width: 100%;
    }
    
    .message {
        max-width: 90%;
    }
    
    .welcome-title {
        font-size: 1.5rem;
    }
    
    .welcome-description {
        font-size: 0.85rem;
    }
    
    .payment-container {
        margin: 20px;
    }
    
    .payment-methods {
        flex-direction: column;
    }
}

@media (max-width: 600px) {
    body {
        font-size: 14px;
    }
    
    .hero-section {
        padding: 50px 0;
    }
    
    .display-4 {
        font-size: 2rem;
    }
}