.krp-frontend-widget {
    max-width: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.krp-search-form {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.krp-search-form h3 {
    margin-top: 0;
    color: #333;
}

.krp-form-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.krp-form-row input,
.krp-form-row select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    flex: 1;
    min-width: 150px;
}

.krp-form-row button {
    padding: 8px 20px;
    background: #007cba;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.krp-form-row button:hover {
    background: #005a87;
}

.krp-results-table {
    overflow-x: auto;
}

.krp-results-table table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.krp-results-table th,
.krp-results-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.krp-results-table th {
    background: #f5f5f5;
    font-weight: 600;
    cursor: pointer;
}

.krp-results-table tr:hover {
    background: #f9f9f9;
}

.krp-export-section {
    text-align: right;
    margin: 15px 0;
}

.krp-export-csv {
    padding: 8px 16px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.krp-export-csv:hover {
    background: #218838;
}

.krp-pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin: 20px 0;
}

.krp-pagination button {
    padding: 8px 12px;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    border-radius: 4px;
}

.krp-pagination button.active {
    background: #007cba;
    color: white;
}

.krp-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.krp-error {
    background: #f8d7da;
    color: #721c24;
    padding: 12px;
    border-radius: 4px;
    margin: 10px 0;
}

.krp-country {
    min-width: 150px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    font-size: 14px;
}

/* Ensure proper alignment in form row */
.krp-form-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}
/* Highlight the original searched keyword */
.krp-original-keyword {
    background-color: #f0f9ff !important;
    border-left: 4px solid #007cba;
}

.krp-badge {
    background: #007cba;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    margin-left: 5px;
    vertical-align: middle;
}

/* Make the table more readable */
.krp-results-table td {
    vertical-align: middle;
    padding: 12px 8px;
}
/* Mobile responsiveness */
@media (max-width: 600px) {
    .krp-country {
        min-width: 100%;
        width: 100%;
    }
    
    .krp-form-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .krp-form-row input,
    .krp-form-row select,
    .krp-form-row button {
        width: 100%;
    }
}

@media (max-width: 600px) {
    .krp-form-row {
        flex-direction: column;
    }
    
    .krp-form-row input,
    .krp-form-row select,
    .krp-form-row button {
        width: 100%;
    }
    
    .krp-results-table {
        font-size: 14px;
    }
}