/* Know Before You Go Widget Styles */
:root {
    --fbc-bg: #e3f2f4;
    --fbc-header: #004c6d;
    --fbc-hero: #00324a;
    --fbc-panel: #b2d6db;
    --fbc-accent: #198fb4;
}

/* Widget Container */
.kbyg-widget {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    line-height: 1.6;
}

/* Widget Header */
.kbyg-widget-header {
    background: linear-gradient(135deg, var(--fbc-header), var(--fbc-accent));
    color: white;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.kbyg-widget-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    background: white;
    padding: 4px;
    border-radius: 4px;
}

.kbyg-widget-title {
    font-weight: 600;
    font-size: 16px;
    flex: 1;
}

.kbyg-powered {
    margin-left: auto;
    font-size: 12px;
    opacity: 0.9;
}

/* Widget Body */
.kbyg-widget-body {
    padding: 20px;
}

/* Form Styles */
.kbyg-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.kbyg-form-group {
    margin-bottom: 16px;
}

.kbyg-form-group label {
    display: block;
    color: var(--fbc-header);
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 14px;
}

.kbyg-form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    color: var(--fbc-header);
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.kbyg-form-group select:focus {
    outline: none;
    border-color: var(--fbc-accent);
    box-shadow: 0 0 0 3px rgba(25, 143, 180, 0.1);
}

/* Submit Button */
.kbyg-submit-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--fbc-header), var(--fbc-accent));
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.kbyg-submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 76, 109, 0.3);
}

.kbyg-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Results Pane */
.kbyg-results {
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    margin-top: 15px;
    max-height: 400px;
    overflow-y: auto;
}

.kbyg-results-header {
    background: var(--fbc-bg);
    padding: 12px 16px;
    border-bottom: 1px solid #e1e5e9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.kbyg-results-title {
    font-weight: 600;
    color: var(--fbc-header);
    font-size: 14px;
}

.kbyg-copy-btn {
    background: var(--fbc-accent);
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.kbyg-copy-btn:hover {
    background: var(--fbc-header);
}

.kbyg-results-content {
    padding: 16px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--fbc-hero);
}

.kbyg-full-link {
    text-align: center;
    padding: 12px;
    border-top: 1px solid #e1e5e9;
    background: #fafafa;
}

.kbyg-full-link a {
    color: var(--fbc-accent);
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: color 0.3s ease;
}

.kbyg-full-link a:hover {
    color: var(--fbc-header);
}

/* Loading State */
.kbyg-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    gap: 12px;
    color: var(--fbc-header);
    background: #f8f9fa;
    border-radius: 8px;
    margin-top: 15px;
}

.kbyg-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #e1e5e9;
    border-top: 3px solid var(--fbc-accent);
    border-radius: 50%;
    animation: kbyg-spin 1s linear infinite;
}

@keyframes kbyg-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Size Variants */
.kbyg-widget-small {
    max-width: 300px;
}

.kbyg-widget-small .kbyg-widget-header {
    padding: 12px 16px;
}

.kbyg-widget-small .kbyg-widget-title {
    font-size: 14px;
}

.kbyg-widget-small .kbyg-widget-body {
    padding: 16px;
}

.kbyg-widget-small .kbyg-form-group {
    margin-bottom: 12px;
}

.kbyg-widget-small .kbyg-submit-btn {
    padding: 10px;
    font-size: 14px;
}

.kbyg-widget-medium {
    max-width: 400px;
}

.kbyg-widget-large {
    max-width: 500px;
}

.kbyg-widget-large .kbyg-widget-header {
    padding: 18px 24px;
}

.kbyg-widget-large .kbyg-widget-title {
    font-size: 18px;
}

.kbyg-widget-large .kbyg-widget-body {
    padding: 24px;
}

/* Error State */
.kbyg-error {
    background: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.kbyg-error-content {
    padding: 20px;
    text-align: center;
}

.kbyg-error-content p {
    margin: 0 0 12px 0;
    font-weight: 600;
}

.kbyg-error-content a {
    color: var(--fbc-accent);
    text-decoration: none;
    font-weight: 600;
}

/* Button & Banner Styles for Static Integration */
.fbc-btn-small {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: linear-gradient(135deg, var(--fbc-bg), white);
    color: var(--fbc-header);
    text-decoration: none;
    border: 2px solid var(--fbc-accent);
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    cursor: pointer;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.fbc-btn-small:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(25, 143, 180, 0.2);
    border-color: var(--fbc-header);
}

.fbc-btn-medium {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--fbc-bg), white);
    color: var(--fbc-header);
    text-decoration: none;
    border: 2px solid var(--fbc-accent);
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    cursor: pointer;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.fbc-btn-medium:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(25, 143, 180, 0.2);
    border-color: var(--fbc-header);
}

.fbc-banner {
    display: flex;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, var(--fbc-bg), white);
    border: 2px solid var(--fbc-accent);
    border-radius: 12px;
    text-decoration: none;
    color: var(--fbc-header);
    transition: all 0.3s ease;
    max-width: 500px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.fbc-banner:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(25, 143, 180, 0.2);
    border-color: var(--fbc-header);
}

.fbc-banner-text {
    flex: 1;
    margin-left: 15px;
}

.fbc-banner-title {
    font-weight: 700;
    font-size: 18px;
    margin-bottom: 5px;
    color: var(--fbc-header);
}

.fbc-banner-subtitle {
    font-size: 14px;
    color: var(--fbc-hero);
    opacity: 0.8;
}

.fbc-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

/* Responsive Design */
@media (max-width: 480px) {
    .kbyg-widget-large .kbyg-form-grid {
        grid-template-columns: 1fr;
    }

    .kbyg-widget {
        margin: 0 10px;
    }

    .fbc-banner {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .fbc-banner-text {
        margin-left: 0;
    }
}