/* Filtrabio Hero Widget v1.5 - CSS Ultra-Safe */

/* Widget */
div.fbh-widget {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

div.fbh-widget div.fbh-form {
    background: transparent;
}

div.fbh-widget div.fbh-input-group {
    display: flex;
    flex-direction: row;
    align-items: center;
    background-color: #ffffff;
    border: 2px solid #1E5F8C;
    border-radius: 12px;
    overflow: hidden;
}

div.fbh-widget input.fbh-input {
    flex: 1;
    min-width: 0;
    border: none;
    padding: 15px;
    font-size: 1.1rem;
    outline: none;
    background-color: transparent;
    box-shadow: none;
    color: #333333;
}

div.fbh-widget button.fbh-button {
    background-color: #1E5F8C;
    color: #ffffff;
    border: none;
    padding: 15px 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

div.fbh-widget button.fbh-button:hover {
    opacity: 0.9;
}

/* Mobile */
@media (max-width: 480px) {
    div.fbh-widget div.fbh-input-group {
        flex-direction: column;
    }
    
    div.fbh-widget input.fbh-input {
        width: 100%;
        padding: 14px 15px;
        font-size: 0.95rem;
        text-align: center;
    }
    
    div.fbh-widget button.fbh-button {
        width: 100%;
        padding: 14px 16px;
        font-size: 0.9rem;
    }
}

/* Modal */
div.fbh-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

div.fbh-modal div.fbh-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
}

div.fbh-modal div.fbh-modal-container {
    position: relative;
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    overflow-y: auto;
}

div.fbh-modal button.fbh-modal-close {
    position: fixed;
    top: 10px;
    right: 10px;
    z-index: 10;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #ffffff;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    color: #666666;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

@media (min-width: 640px) {
    div.fbh-modal {
        padding: 20px;
    }
    
    div.fbh-modal div.fbh-modal-container {
        width: 90%;
        max-width: 500px;
        height: auto;
        max-height: 90vh;
        border-radius: 12px;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    }
    
    div.fbh-modal button.fbh-modal-close {
        position: absolute;
        top: 12px;
        right: 12px;
    }
}

/* Loading */
div.fbh-modal div.fbh-loading {
    padding: 35px 15px;
    text-align: center;
}

div.fbh-modal div.fbh-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f0f0f0;
    border-top-color: #1E5F8C;
    border-radius: 50%;
    margin: 0 auto 12px auto;
    animation: fbhspin 1s linear infinite;
}

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

div.fbh-modal div.fbh-loading p {
    color: #666666;
    font-size: 0.85rem;
}

/* Results */
div.fbh-modal div.fbh-results {
    padding: 14px;
}

div.fbh-modal div.fbh-results-header {
    text-align: center;
    padding-bottom: 10px;
    margin-bottom: 10px;
    border-bottom: 1px solid #eeeeee;
}

div.fbh-modal div.fbh-results-icon {
    font-size: 2rem;
    margin-bottom: 5px;
}

div.fbh-modal h2.fbh-results-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #333333;
    margin: 0 0 3px 0;
}

div.fbh-modal p.fbh-results-location {
    font-size: 1rem;
    font-weight: 600;
    color: #1E5F8C;
    margin: 0;
}

div.fbh-modal p.fbh-results-source {
    font-size: 0.65rem;
    color: #999999;
    margin: 5px 0 0 0;
}

/* Grid */
div.fbh-modal div.fbh-results-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-bottom: 10px;
}

div.fbh-modal div.fbh-param {
    background-color: #ffffff;
    border-radius: 6px;
    padding: 7px 5px;
    text-align: center;
    border-left: 3px solid #6c757d;
}

div.fbh-modal div.fbh-param.status-good {
    border-left-color: #27AE60;
    background-color: #f0fdf4;
}

div.fbh-modal div.fbh-param.status-warning {
    border-left-color: #F39C12;
    background-color: #fffbeb;
}

div.fbh-modal div.fbh-param.status-danger {
    border-left-color: #E74C3C;
    background-color: #fef2f2;
}

div.fbh-modal div.fbh-param.status-info {
    border-left-color: #3498DB;
    background-color: #eff6ff;
}

div.fbh-modal div.fbh-param.status-unknown {
    border-left-color: #6c757d;
    background-color: #f9fafb;
}

div.fbh-modal div.fbh-param-icon {
    font-size: 1.2rem;
    margin-bottom: 3px;
}

div.fbh-modal div.fbh-param-label {
    font-size: 0.6rem;
    font-weight: 700;
    color: #333333;
    margin-bottom: 3px;
}

div.fbh-modal div.fbh-param-status {
    display: inline-block;
    font-size: 0.55rem;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 10px;
}

div.fbh-modal div.status-good div.fbh-param-status {
    background-color: rgba(39, 174, 96, 0.2);
    color: #1e8449;
}

div.fbh-modal div.status-warning div.fbh-param-status {
    background-color: rgba(243, 156, 18, 0.2);
    color: #b7791f;
}

div.fbh-modal div.status-danger div.fbh-param-status {
    background-color: rgba(231, 76, 60, 0.2);
    color: #c0392b;
}

div.fbh-modal div.status-info div.fbh-param-status {
    background-color: rgba(52, 152, 219, 0.2);
    color: #2874a6;
}

div.fbh-modal div.status-unknown div.fbh-param-status {
    background-color: rgba(108, 117, 125, 0.2);
    color: #5a6268;
}

div.fbh-modal div.fbh-param-desc {
    display: none;
}

/* Summary */
div.fbh-modal div.fbh-results-summary {
    background-color: #eff6ff;
    border-left: 3px solid #1E5F8C;
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 12px;
}

div.fbh-modal div.fbh-results-summary.summary-danger {
    background-color: #fef2f2;
    border-left-color: #E74C3C;
}

div.fbh-modal div.fbh-results-summary p {
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.5;
    color: #333333;
}

/* CTA */
div.fbh-modal div.fbh-results-cta {
    text-align: center;
    padding-top: 10px;
    border-top: 1px solid #eeeeee;
}

div.fbh-modal p.fbh-cta-text {
    font-size: 0.8rem;
    color: #333333;
    font-weight: 500;
    margin: 0 0 10px 0;
}

div.fbh-modal a.fbh-cta-button {
    display: block;
    width: 100%;
    background-color: #1E5F8C;
    color: #ffffff;
    text-decoration: none;
    padding: 12px 16px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    text-align: center;
    box-sizing: border-box;
}

div.fbh-modal button.fbh-retry-button {
    display: block;
    width: 100%;
    background-color: transparent;
    border: none;
    color: #666666;
    font-size: 0.8rem;
    padding: 10px;
    cursor: pointer;
}
