/* Custom Styles for Botswana Financial Portal */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #212529;
}

/* Global Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.hero-image {
    text-align: center;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* Search Form */
.search-form .form-control {
    border: none;
    border-radius: 50px 0 0 50px;
    padding: 15px 25px;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.search-form .btn {
    border-radius: 0 50px 50px 0;
    padding: 15px 30px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Cards */
.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 15px;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15) !important;
}

.card-body {
    padding: 1.5rem;
}

/* Sector Cards */
.sector-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.sector-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    border-color: var(--primary-color);
}

.sector-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    color: white;
}

/* Feature Icons */
.feature-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    color: white;
}

/* Navigation */
.navbar {
    backdrop-filter: blur(10px);
    background-color: rgba(13, 110, 253, 0.95) !important;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

/* Buttons */
.btn {
    border-radius: 25px;
    padding: 10px 25px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0056b3, var(--primary-color));
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(13, 110, 253, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning-color), #e0a800);
    border: none;
    color: var(--dark-color);
}

.btn-warning:hover {
    background: linear-gradient(135deg, #e0a800, var(--warning-color));
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 193, 7, 0.4);
}

/* Badges */
.badge {
    border-radius: 20px;
    padding: 8px 15px;
    font-weight: 600;
}

/* Forms */
.form-control {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    padding: 12px 15px;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Tables */
.table {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.table thead th {
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
    color: white;
    border: none;
    font-weight: 600;
}

/* Alerts */
.alert {
    border-radius: 15px;
    border: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Footer */
footer {
    background: linear-gradient(135deg, var(--dark-color), #343a40) !important;
    color: #fff !important;
}
footer a {
    color: #fff !important;
    text-decoration: none;
    transition: color 0.2s;
}
footer a:hover, footer a:focus {
    color: var(--primary-color) !important;
    text-decoration: underline;
}
footer, footer ul, footer li, footer p, footer h5, footer h6, footer span, footer small, footer .text-muted, footer .small {
    color: #fff !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        text-align: center;
        padding-top: 100px;
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .search-form .input-group {
        flex-direction: column !important;
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .search-form .input-group-lg > .form-control,
    .search-form .input-group-lg > .btn {
        border-radius: 25px !important;
        margin-bottom: 10px;
        width: 100%;
        font-size: 1rem !important;
        padding: 12px 20px !important;
        height: auto !important;
    }
    
    .search-form .btn {
        margin-bottom: 0;
        margin-top: 5px;
    }
    
    .sector-card {
        margin-bottom: 20px;
    }
}

/* Extra small devices (phones, 576px and down) */
@media (max-width: 576px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-section .lead {
        font-size: 1rem;
    }
    
    .search-form .input-group {
        max-width: 100%;
        padding: 0 15px;
        flex-direction: column !important;
    }
    
    .search-form .input-group-lg > .form-control,
    .search-form .input-group-lg > .btn {
        font-size: 0.95rem !important;
        padding: 10px 15px !important;
        height: auto !important;
        width: 100% !important;
    }
    
    .search-form .btn {
        padding: 10px 20px !important;
        margin-top: 5px;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0056b3;
}

/* Print Styles */
@media print {
    .navbar,
    .hero-section,
    footer {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus styles for accessibility */
.btn:focus,
.form-control:focus,
.nav-link:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid var(--dark-color);
    }
    
    .btn {
        border: 2px solid currentColor;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
} 

/* Redesigned Floating Chatbot Styles */
#chatbot-btn {
    position: fixed;
    bottom: 32px;
    right: 32px;
    background: linear-gradient(135deg, #0077b6 60%, #48cae4 100%);
    color: #fff;
    border-radius: 50%;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    box-shadow: 0 6px 24px rgba(0,0,0,0.18);
    cursor: pointer;
    z-index: 9999;
    transition: background 0.2s, box-shadow 0.2s, transform 0.3s;
    border: none;
    outline: none;
    animation: chatbot-fadein 0.7s;
}
#chatbot-btn:hover {
    background: linear-gradient(135deg, #023e8a 60%, #90e0ef 100%);
    box-shadow: 0 8px 32px rgba(0,0,0,0.22);
    transform: scale(1.07);
}
#chatbot-window {
    position: fixed;
    bottom: 110px;
    right: 36px;
    width: 370px;
    max-width: 98vw;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 12px 48px rgba(0,0,0,0.22);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-family: 'Segoe UI', Arial, sans-serif;
    border: 1.5px solid #e0e7ef;
    animation: chatbot-slidein 0.4s;
}
@keyframes chatbot-slidein {
    from { opacity: 0; transform: translateY(40px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes chatbot-fadein {
    from { opacity: 0; transform: scale(0.7); }
    to { opacity: 1; transform: scale(1); }
}
#chatbot-header {
    background: linear-gradient(90deg, #0077b6 70%, #48cae4 100%);
    color: #fff;
    padding: 16px 20px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
}
#chatbot-close {
    cursor: pointer;
    font-size: 1.3rem;
    opacity: 0.8;
    transition: opacity 0.2s;
}
#chatbot-close:hover {
    opacity: 1;
}
#chatbot-messages {
    flex: 1;
    padding: 16px 12px 12px 12px;
    overflow-y: auto;
    max-height: 340px;
    background: #f6faff;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.chatbot-msg {
    display: flex;
    align-items: flex-end;
    margin-bottom: 0;
    gap: 8px;
}
.chatbot-msg.user {
    flex-direction: row-reverse;
    justify-content: flex-end;
}
.chatbot-msg.bot {
    justify-content: flex-start;
}
.chatbot-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #caf0f8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}
.chatbot-msg-content {
    background: #e9ecef;
    color: #222;
    padding: 10px 14px;
    border-radius: 14px;
    max-width: 78%;
    font-size: 1rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    word-break: break-word;
}
.chatbot-msg.user .chatbot-msg-content {
    background: #48cae4;
    color: #fff;
    border-bottom-right-radius: 4px;
    border-bottom-left-radius: 14px;
    border-top-right-radius: 14px;
    border-top-left-radius: 14px;
}
.chatbot-msg.bot .chatbot-msg-content {
    background: #e9ecef;
    color: #222;
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 14px;
    border-top-right-radius: 14px;
    border-top-left-radius: 14px;
}
#chatbot-form {
    display: flex;
    border-top: 1px solid #e0e7ef;
    background: #f1f6fa;
    padding: 10px 10px 10px 14px;
    gap: 8px;
}
#chatbot-input {
    flex: 1;
    border: none;
    padding: 12px;
    font-size: 1rem;
    border-radius: 8px;
    outline: none;
    background: #f6faff;
    color: #222;
    transition: box-shadow 0.2s;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
#chatbot-input:focus {
    box-shadow: 0 2px 8px #48cae4aa;
}
#chatbot-form button {
    background: linear-gradient(135deg, #0077b6 60%, #48cae4 100%);
    color: #fff;
    border: none;
    padding: 0 22px;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 8px;
    font-weight: 600;
    transition: background 0.2s, box-shadow 0.2s;
    box-shadow: 0 1px 4px rgba(0,0,0,0.07);
}
#chatbot-form button:hover {
    background: linear-gradient(135deg, #023e8a 60%, #90e0ef 100%);
}
@media (max-width: 500px) {
    #chatbot-window {
        width: 99vw;
        right: 0.5vw;
        bottom: 80px;
    }
    #chatbot-btn {
        right: 1vw;
        bottom: 10px;
    }
} 

 